mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 22:50:12 +01:00
logging: split out enum type definition for LogBackend
This commit is contained in:
parent
8dcc3cd51a
commit
eea11faf9a
1 changed files with 15 additions and 11 deletions
|
|
@ -53,6 +53,12 @@ typedef struct {
|
|||
const char *name;
|
||||
} LogDesc;
|
||||
|
||||
typedef enum {
|
||||
LOG_BACKEND_GLIB,
|
||||
LOG_BACKEND_SYSLOG,
|
||||
LOG_BACKEND_JOURNAL,
|
||||
} LogBackend;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const char *level_str;
|
||||
|
|
@ -86,17 +92,15 @@ static struct Global {
|
|||
bool debug_stderr:1;
|
||||
const char *prefix;
|
||||
const char *syslog_identifier;
|
||||
enum {
|
||||
/* before we setup syslog (during start), the backend defaults to GLIB, meaning:
|
||||
* we use g_log() for all logging. At that point, the application is not yet supposed
|
||||
* to do any logging and doing so indicates a bug.
|
||||
*
|
||||
* Afterwards, the backend is either SYSLOG or JOURNAL. From that point, also
|
||||
* g_log() is redirected to this backend via a logging handler. */
|
||||
LOG_BACKEND_GLIB,
|
||||
LOG_BACKEND_SYSLOG,
|
||||
LOG_BACKEND_JOURNAL,
|
||||
} log_backend;
|
||||
|
||||
/* before we setup syslog (during start), the backend defaults to GLIB, meaning:
|
||||
* we use g_log() for all logging. At that point, the application is not yet supposed
|
||||
* to do any logging and doing so indicates a bug.
|
||||
*
|
||||
* Afterwards, the backend is either SYSLOG or JOURNAL. From that point, also
|
||||
* g_log() is redirected to this backend via a logging handler. */
|
||||
LogBackend log_backend;
|
||||
|
||||
char *logging_domains_to_string;
|
||||
} global = {
|
||||
/* nm_logging_setup ("INFO", LOGD_DEFAULT_STRING, NULL, NULL); */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue