1 /**
2  * @file
3  * NeoMutt Logging
4  *
5  * @authors
6  * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
7  *
8  * @copyright
9  * This program is free software: you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License as published by the Free Software
11  * Foundation, either version 2 of the License, or (at your option) any later
12  * version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License along with
20  * this program.  If not, see <http://www.gnu.org/licenses/>.
21  */
22 
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 int log_disp_curses(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, ...);
35 
36 void mutt_log_prep(void);
37 int  mutt_log_start(void);
38 void mutt_log_stop(void);
39 int  mutt_log_set_level(enum LogLevel level, bool verbose);
40 int  mutt_log_set_file(const char *file);
41 
42 int  main_log_observer(struct NotifyCallback *nc);
43 int  level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
44 
45 void mutt_clear_error(void);
46 
47 #endif /* MUTT_MUTT_LOGGING_H */
48