NeoMutt  2021-02-05-89-gabe350
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 #include "mutt/lib.h"
30 
31 struct ConfigDef;
32 struct ConfigSet;
33 
34 extern short C_DebugLevel;
35 extern char *C_DebugFile;
36 
37 int log_disp_curses(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, ...);
38 
39 void mutt_log_prep(void);
40 int mutt_log_start(void);
41 void mutt_log_stop(void);
42 int mutt_log_set_level(enum LogLevel level, bool verbose);
43 int mutt_log_set_file(const char *file, bool verbose);
44 int mutt_log_observer(struct NotifyCallback *nc);
45 int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
46 
47 void mutt_clear_error(void);
48 
49 #endif /* MUTT_MUTT_LOGGING_H */
NotifyCallback
Data passed to a notification function.
Definition: observer.h:39
Buffer
String manipulation buffer.
Definition: buffer.h:33
mutt_clear_error
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:113
C_DebugFile
char * C_DebugFile
Config: File to save debug logs.
Definition: mutt_logging.c:49
mutt_log_set_file
int mutt_log_set_file(const char *file, bool verbose)
Change the logging file.
Definition: mutt_logging.c:238
mutt_log_stop
void mutt_log_stop(void)
Close the log file.
Definition: mutt_logging.c:223
level_validator
int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "debug_level" config variable - Implements ConfigDef::validator()
Definition: mutt_logging.c:302
lib.h
mutt_log_set_level
int mutt_log_set_level(enum LogLevel level, bool verbose)
Change the logging level.
Definition: mutt_logging.c:263
C_DebugLevel
short C_DebugLevel
Config: Logging level for debug logs.
Definition: mutt_logging.c:48
log_disp_curses
int log_disp_curses(time_t stamp, const char *file, int line, const char *function, enum LogLevel level,...)
Display a log line in the message line - Implements log_dispatcher_t.
Definition: mutt_logging.c:127
ConfigDef
Config item definition.
Definition: set.h:61
ConfigSet
Container for lots of config items.
Definition: set.h:228
mutt_log_prep
void mutt_log_prep(void)
Prepare to log.
Definition: mutt_logging.c:213
LogLevel
LogLevel
Names for the Logging Levels.
Definition: logging.h:34
mutt_log_observer
int mutt_log_observer(struct NotifyCallback *nc)
Listen for config changes affecting the log file - Implements observer_t.
Definition: mutt_logging.c:317
mutt_log_start
int mutt_log_start(void)
Enable file logging.
Definition: mutt_logging.c:282