mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
log: make more logging options configurable
* Add --log-colorize=never|always|auto * Add --log-no-syslog
This commit is contained in:
parent
3f940ec2a8
commit
7397ab9457
5 changed files with 74 additions and 19 deletions
6
log.h
6
log.h
|
@ -1,7 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
enum log_colorize { LOG_COLORIZE_NEVER, LOG_COLORIZE_ALWAYS, LOG_COLORIZE_AUTO };
|
||||
enum log_class { LOG_CLASS_ERROR, LOG_CLASS_WARNING, LOG_CLASS_INFO, LOG_CLASS_DEBUG };
|
||||
|
||||
void log_init(enum log_colorize colorize, bool do_syslog);
|
||||
void log_deinit(void);
|
||||
|
||||
void log_msg(enum log_class log_class, const char *module,
|
||||
const char *file, int lineno,
|
||||
const char *fmt, ...) __attribute__((format (printf, 5, 6)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue