]> sjero.net Git - wget/blob - src/log.h
Add --show-progress to force display progress bar
[wget] / src / log.h
1 /* Declarations for log.c.
2    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
3    2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4
5 This file is part of GNU Wget.
6
7 GNU Wget is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11
12 GNU Wget is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Wget.  If not, see <http://www.gnu.org/licenses/>.
19
20 Additional permission under GNU GPL version 3 section 7
21
22 If you modify this program, or any covered work, by linking or
23 combining it with the OpenSSL project's OpenSSL library (or a
24 modified version of that library), containing parts covered by the
25 terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
26 grants you additional permission to convey the resulting work.
27 Corresponding Source for a non-source form of such a combination
28 shall include the source code for the parts of OpenSSL used as well
29 as that of the covered work.  */
30
31 #ifndef LOG_H
32 #define LOG_H
33
34 /* The log file to which Wget writes to after HUP.  */
35 #define DEFAULT_LOGFILE "wget-log"
36
37 #include <stdio.h>
38
39 enum log_options { LOG_VERBOSE, LOG_NOTQUIET, LOG_NONVERBOSE, LOG_ALWAYS, LOG_PROGRESS };
40
41 void log_set_warc_log_fp (FILE *);
42
43 void logprintf (enum log_options, const char *, ...)
44      GCC_FORMAT_ATTR (2, 3);
45 void debug_logprintf (const char *, ...) GCC_FORMAT_ATTR (1, 2);
46 void logputs (enum log_options, const char *);
47 void logflush (void);
48 void log_set_flush (bool);
49 bool log_set_save_context (bool);
50
51 void log_init (const char *, bool);
52 void log_close (void);
53 void log_cleanup (void);
54 void log_request_redirect_output (const char *);
55
56 const char *escnonprint (const char *);
57 const char *escnonprint_uri (const char *);
58
59 #endif /* LOG_H */