gmessages.h File Reference

API published in:
API deprecated in:


#include <_ansi.h>
#include <stdarg.h>
#include <glib/gtypes.h>
#include <glib/gmacros.h>

Go to the source code of this file.


Defines

#define  G_LOG_LEVEL_USER_SHIFT   (8)
#define  G_LOG_FATAL_MASK   (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR)
#define  G_LOG_DOMAIN   ((gchar*) 0)
#define  g_assert(expr)
#define  g_assert_not_reached()
#define  g_return_if_fail(expr)
#define  g_return_val_if_fail(expr, val)
#define  g_return_if_reached()
#define  g_return_val_if_reached(val)

Typedefs

typedef void(*  GLogFunc )(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
typedef void(*  GPrintFunc )(const gchar *string)

Enumerations

enum   GLogLevelFlags {
  G_LOG_FLAG_RECURSION = 1 << 0, G_LOG_FLAG_FATAL = 1 << 1, G_LOG_LEVEL_ERROR = 1 << 2, 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)
}

Functions

G_BEGIN_DECLS IMPORT_C gsize  g_printf_string_upper_bound (const gchar *format, va_list args)
IMPORT_C guint  g_log_set_handler (const gchar *log_domain, GLogLevelFlags log_levels, GLogFunc log_func, gpointer user_data)
IMPORT_C void  g_log_remove_handler (const gchar *log_domain, guint handler_id)
IMPORT_C void  g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
IMPORT_C GLogFunc  g_log_set_default_handler (GLogFunc log_func, gpointer user_data)
IMPORT_C void  g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format,...) G_GNUC_PRINTF(3
IMPORT_C void IMPORT_C void  g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args)
IMPORT_C GLogLevelFlags  g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask)
IMPORT_C GLogLevelFlags  g_log_set_always_fatal (GLogLevelFlags fatal_mask)
void  _g_log_fallback_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data) G_GNUC_INTERNAL
IMPORT_C void  g_return_if_fail_warning (const char *log_domain, const char *pretty_function, const char *expression)
IMPORT_C void  g_assert_warning (const char *log_domain, const char *file, const int line, const char *pretty_function, const char *expression) G_GNUC_NORETURN
IMPORT_C void  g_print (const gchar *format,...) G_GNUC_PRINTF(1
IMPORT_C void IMPORT_C GPrintFunc  g_set_print_handler (GPrintFunc func)
IMPORT_C void  g_printerr (const gchar *format,...) G_GNUC_PRINTF(1
IMPORT_C void IMPORT_C GPrintFunc  g_set_printerr_handler (GPrintFunc func)

Define Documentation

#define g_assert expr   ) 
 

Value:

G_STMT_START{           \
     if (expr) { } else                                         \
       g_log (G_LOG_DOMAIN,                                     \
              G_LOG_LEVEL_ERROR,                                \
              "file %s: line %d: assertion failed: (%s)",       \
              __FILE__,                                         \
              __LINE__,                                         \
              #expr);                   }G_STMT_END
#define g_assert_not_reached
 
 ) 
 

Value:

G_STMT_START{   \
     g_log (G_LOG_DOMAIN,                               \
            G_LOG_LEVEL_ERROR,                          \
            "file %s: line %d: should not be reached",  \
            __FILE__,                                   \
            __LINE__);          }G_STMT_END
#define G_LOG_DOMAIN   ((gchar*) 0)
 
#define G_LOG_FATAL_MASK   (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR)
 
#define G_LOG_LEVEL_USER_SHIFT   (8)
 
#define g_return_if_fail expr   ) 
 

Value:

G_STMT_START{           \
     if (expr) { } else                                         \
       {                                                        \
         g_log (G_LOG_DOMAIN,                                   \
                G_LOG_LEVEL_CRITICAL,                           \
                "file %s: line %d: assertion `%s' failed",      \
                __FILE__,                                       \
                __LINE__,                                       \
                #expr);                                         \
         return;                                                \
       };                               }G_STMT_END
#define g_return_if_reached
 
 ) 
 

Value:

G_STMT_START{           \
     g_log (G_LOG_DOMAIN,                                       \
            G_LOG_LEVEL_CRITICAL,                               \
            "file %s: line %d: should not be reached",          \
            __FILE__,                                           \
            __LINE__);                                          \
     return;                            }G_STMT_END
#define g_return_val_if_fail expr,
val   ) 
 

Value:

G_STMT_START{           \
     if (expr) { } else                                         \
       {                                                        \
         g_log (G_LOG_DOMAIN,                                   \
                G_LOG_LEVEL_CRITICAL,                           \
                "file %s: line %d: assertion `%s' failed",      \
                __FILE__,                                       \
                __LINE__,                                       \
                #expr);                                         \
         return (val);                                          \
       };                               }G_STMT_END
#define g_return_val_if_reached val   ) 
 

Value:

G_STMT_START{           \
     g_log (G_LOG_DOMAIN,                                       \
            G_LOG_LEVEL_CRITICAL,                               \
            "file %s: line %d: should not be reached",          \
            __FILE__,                                           \
            __LINE__);                                          \
     return (val);                      }G_STMT_END

Typedef Documentation

typedef void(* GLogFunc)(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 
typedef void(* GPrintFunc)(const gchar *string)
 

Enumeration Type Documentation

enum GLogLevelFlags
 
Enumerator:
G_LOG_FLAG_RECURSION 
G_LOG_FLAG_FATAL 
G_LOG_LEVEL_ERROR 
G_LOG_LEVEL_CRITICAL 
G_LOG_LEVEL_WARNING 
G_LOG_LEVEL_MESSAGE 
G_LOG_LEVEL_INFO 
G_LOG_LEVEL_DEBUG 
G_LOG_LEVEL_MASK 

Function Documentation

void _g_log_fallback_handler const gchar log_domain,
GLogLevelFlags  log_level,
const gchar message,
gpointer  unused_data
 
IMPORT_C void g_assert_warning const char *  log_domain,
const char *  file,
const int  line,
const char *  pretty_function,
const char *  expression
 
IMPORT_C void g_log const gchar log_domain,
GLogLevelFlags  log_level,
const gchar format,
  ...
 
IMPORT_C void g_log_default_handler const gchar log_domain,
GLogLevelFlags  log_level,
const gchar message,
gpointer  unused_data
 
IMPORT_C void g_log_remove_handler const gchar log_domain,
guint  handler_id
 
IMPORT_C GLogLevelFlags g_log_set_always_fatal GLogLevelFlags  fatal_mask  ) 
 
IMPORT_C GLogFunc g_log_set_default_handler GLogFunc  log_func,
gpointer  user_data
 
IMPORT_C GLogLevelFlags g_log_set_fatal_mask const gchar log_domain,
GLogLevelFlags  fatal_mask
 
IMPORT_C guint g_log_set_handler const gchar log_domain,
GLogLevelFlags  log_levels,
GLogFunc  log_func,
gpointer  user_data
 
IMPORT_C void IMPORT_C void g_logv const gchar log_domain,
GLogLevelFlags  log_level,
const gchar format,
va_list  args
 
IMPORT_C void g_print const gchar format,
  ...
 
IMPORT_C void g_printerr const gchar format,
  ...
 
G_BEGIN_DECLS IMPORT_C gsize g_printf_string_upper_bound const gchar format,
va_list  args
 
IMPORT_C void g_return_if_fail_warning const char *  log_domain,
const char *  pretty_function,
const char *  expression
 
IMPORT_C void IMPORT_C GPrintFunc g_set_print_handler GPrintFunc  func  ) 
 
IMPORT_C void IMPORT_C GPrintFunc g_set_printerr_handler GPrintFunc  func  ) 
 

Copyright © Nokia Corporation 2001-2008
Back to top