mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Support DEBUG log level in console_log
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
1be9127ee7
commit
6fdc692aa5
@ -3458,6 +3458,9 @@ nserror browser_window_console_log(struct browser_window *bw,
|
||||
"unknown input location"));
|
||||
|
||||
switch (log_level) {
|
||||
case BW_CS_FLAG_LEVEL_DEBUG:
|
||||
NSLOG(netsurf, DEBUG, "%.*s", (int)msglen, msg);
|
||||
break;
|
||||
case BW_CS_FLAG_LEVEL_LOG:
|
||||
NSLOG(netsurf, VERBOSE, "%.*s", (int)msglen, msg);
|
||||
break;
|
||||
|
@ -378,6 +378,9 @@ gui_window_console_log(struct gui_window *g,
|
||||
}
|
||||
|
||||
switch (flags & BW_CS_FLAG_LEVEL_MASK) {
|
||||
case BW_CS_FLAG_LEVEL_DEBUG:
|
||||
level_text = "DEBUG";
|
||||
break;
|
||||
case BW_CS_FLAG_LEVEL_LOG:
|
||||
level_text = "LOG";
|
||||
break;
|
||||
|
@ -49,16 +49,19 @@ typedef enum {
|
||||
*/
|
||||
BW_CS_FLAG_FOLDABLE = 1 << 0,
|
||||
|
||||
/** Logged at the 'debug' level, please use only one of the LEVEL flags */
|
||||
BW_CS_FLAG_LEVEL_DEBUG = 0 << 1,
|
||||
/** Logged at the 'log' level, please only use one of the LEVEL flags */
|
||||
BW_CS_FLAG_LEVEL_LOG = 0 << 1,
|
||||
BW_CS_FLAG_LEVEL_LOG = 1 << 1,
|
||||
/** Logged at the 'info' level, please use only one of the LEVEL flags */
|
||||
BW_CS_FLAG_LEVEL_INFO = 1 << 1,
|
||||
BW_CS_FLAG_LEVEL_INFO = 2 << 1,
|
||||
/** Logged at the 'warn' level, please use only one of the LEVEL flags */
|
||||
BW_CS_FLAG_LEVEL_WARN = 2 << 1,
|
||||
BW_CS_FLAG_LEVEL_WARN = 3 << 1,
|
||||
/** Logged at the 'error' level, please use only one of the LEVEL flags */
|
||||
BW_CS_FLAG_LEVEL_ERROR = 3 << 1,
|
||||
BW_CS_FLAG_LEVEL_ERROR = 4 << 1,
|
||||
/* Levels 5, 6, 7 unused as yet */
|
||||
/** Mask for the error level to allow easy comparison using the above */
|
||||
BW_CS_FLAG_LEVEL_MASK = 3 << 1,
|
||||
BW_CS_FLAG_LEVEL_MASK = 7 << 1,
|
||||
} browser_window_console_flags;
|
||||
|
||||
#endif /* _NETSURF_CONSOLE_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user