← Back to team overview

elementary-dev-community team mailing list archive

Re: Granite Logger

 

Hello,

the exact enumeration of LogLevelFlags is the following:

typedef enum
{
  /* log flags */
  G_LOG_FLAG_RECURSION          = 1 << 0,
  G_LOG_FLAG_FATAL              = 1 << 1,

  /* GLib log levels */
  G_LOG_LEVEL_ERROR             = 1 << 2,       /* always fatal */
  G_LOG_LEVEL_CRITICAL          = 1 << 3,
  G_LOG_LEVEL_WARNING           = 1 << 4,
  G_LOG_LEVEL_MESSAGE           = 1 << 5,
  G_LOG_LEVEL_INFO              = 1 << 6,
  G_LOG_LEVEL_DEBUG             = 1 << 7,

  G_LOG_LEVEL_MASK              = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL)
} GLogLevelFlags;


what appear in the terminal depend on the log lvl u've chosen.
By default only the log levels <= G_LOG_MESSAGE are printed in the terminal,
which mean fatal, error, critical, warning are printed while info and debug
are not.
Granite.Application take the parameter --debug -d to change the default log
lvl to G_LOG_LEVEL_DEBUG which is the maximum of the enumeration so
LEVEL_INFO and LEVEL_DEBUG would be printed too in the terminal.

References