Skip to content

Commit

Permalink
ordered loglevel
Browse files Browse the repository at this point in the history
changed loglevel 0, new loglevels 1 and 3
  • Loading branch information
Daniel Lauckner committed Feb 13, 2017
1 parent 736d14d commit 70d7362
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion etc/vzlogger.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
// General settings
"daemon": false, // run periodically
"verbosity": 5, // log verbosity (0=log_error and log_warning, 5=log_info, 10=log_debug, 15=log_finest)
"verbosity": 5, // log verbosity (0=log_none, 1=log_error, 3=log_warning, 5=log_info, 10=log_debug, 15=log_finest)
"log": "/tmp/vzlogger.log", // log file, optional
"retry": 30, // http retry delay in seconds

Expand Down
6 changes: 3 additions & 3 deletions etc/vzlogger_generic.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -893,9 +893,9 @@
"verbosity": {
"id": "/verbosity",
"type": "integer",
"enum": [0, 5, 10, 15],
"default": 0,
"description": "depth of loging. 0 = log_error or log-warning, 5 = log_info, 10 = log-debug, 15 = log_finest"
"enum": [0, 1, 3, 5, 10, 15],
"default": 1,
"description": "depth of loging. 0=log_none, 1=log_error, 3=log-warning, 5=log_info, 10=log-debug, 15=log_finest"
},
"log": {
"id": "/log",
Expand Down
5 changes: 3 additions & 2 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@

/* enumerations */
typedef enum {
log_error = -1,
log_warning = 0,
log_none = 0,
log_error = 1,
log_warning = 3,
log_info = 5,
log_debug = 10,
log_finest = 15
Expand Down
4 changes: 2 additions & 2 deletions src/vzlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}

// always (that's why log_error is used) print version info to log file:
print(log_error, "vzlogger v%s based on %s from %s started.", "main",
// always (that's why log_none is used) print version info to log file:
print(log_none, "vzlogger v%s based on %s from %s started.", "main",
VERSION, g_GIT_SHALONG, g_GIT_LAST_COMMIT_DATE);

//mappings = (MapContainer::Ptr)(new MapContainer());
Expand Down

0 comments on commit 70d7362

Please sign in to comment.