NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
mutt_logging.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_MUTT_LOGGING_H
24 #define MUTT_MUTT_LOGGING_H
25 
26 #include <stdbool.h>
27 #include <stdint.h>
28 #include <time.h>
29 
30 struct Buffer;
31 struct ConfigDef;
32 struct ConfigSet;
33 struct NotifyCallback;
34 
35 extern short C_DebugLevel;
36 extern char *C_DebugFile;
37 
38 int log_disp_curses(time_t stamp, const char *file, int line, const char *function, int level, ...);
39 
40 void mutt_log_prep(void);
41 int mutt_log_start(void);
42 void mutt_log_stop(void);
43 int mutt_log_set_level(int level, bool verbose);
44 int mutt_log_set_file(const char *file, bool verbose);
45 int mutt_log_observer(struct NotifyCallback *nc);
46 int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
47 
48 void mutt_clear_error(void);
49 
50 #endif /* MUTT_MUTT_LOGGING_H */
Container for lots of config items.
Definition: set.h:187
Data passed to a notification function.
Definition: observer.h:40
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:109
String manipulation buffer.
Definition: buffer.h:33
Config item definition.
Definition: set.h:153
int mutt_log_set_file(const char *file, bool verbose)
Change the logging file.
Definition: mutt_logging.c:222
void mutt_log_stop(void)
Close the log file.
Definition: mutt_logging.c:207
char * C_DebugFile
Config: File to save debug logs.
Definition: mutt_logging.c:49
int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "debug_level" config variable.
Definition: mutt_logging.c:292
short C_DebugLevel
Config: Logging level for debug logs.
Definition: mutt_logging.c:48
const char * line
Definition: common.c:36
int mutt_log_start(void)
Enable file logging.
Definition: mutt_logging.c:266
int log_disp_curses(time_t stamp, const char *file, int line, const char *function, int level,...)
Display a log line in the message line - Implements log_dispatcher_t.
Definition: mutt_logging.c:123
int mutt_log_set_level(int level, bool verbose)
Change the logging level.
Definition: mutt_logging.c:247
void mutt_log_prep(void)
Prepare to log.
Definition: mutt_logging.c:197
int mutt_log_observer(struct NotifyCallback *nc)
Listen for config changes affecting the log file - Implements observer_t()
Definition: mutt_logging.c:307