CutLogger 3 Cutterライブラリ
CutLogger

## 概要

    #define             cut_log                             (level,
                                                             format,
                                                             ...)
    #define             cut_log_critical                    (format,
                                                             ...)
    #define             cut_log_error                       (format,
                                                             ...)
    #define             cut_log_warning                     (format,
                                                             ...)
    #define             cut_log_message                     (format,
                                                             ...)
    #define             cut_log_info                        (format,
                                                             ...)
    #define             cut_log_debug                       (format,
                                                             ...)
    #define             cut_log_trace                       (format,
                                                             ...)
    #define             cut_set_log_level                   (level)
    #define             cut_get_log_level
    #define             cut_get_interesting_log_level
    #define             cut_need_log                        (level)
    #define             cut_need_critical_log
    #define             cut_need_error_log
    #define             cut_need_warning_log
    #define             cut_need_message_log
    #define             cut_need_info_log
    #define             cut_need_debug_log
    #define             cut_need_trace_log
    enum                CutLogLevelFlags;
    #define             CUT_LOG_LEVEL_ALL
    #define             CUT_LOG_NULL_SAFE_STRING            (string)
    enum                CutLogItemFlags;
    #define             CUT_LOG_ITEM_ALL
    enum                CutLogColorize;
    #define             CUT_ENUM_ERROR
    #define             CUT_FLAGS_ERROR
    enum                CutEnumError;
    enum                CutFlagsError;
    GQuark              cut_enum_error_quark                (void);
    GQuark              cut_flags_error_quark               (void);
    struct              CutLogger;
    struct              CutLoggerClass;
    GQuark              cut_logger_error_quark              (void);
    CutLogLevelFlags    cut_log_level_flags_from_string     (const gchar *level_name,
                                                             CutLogLevelFlags base_flags,
                                                             GError **error);
    CutLogItemFlags     cut_log_item_flags_from_string      (const gchar *item_name,
                                                             CutLogItemFlags base_flags,
                                                             GError **error);
    CutLogger *         cut_logger                          (void);
    void                cut_logger_default_log_handler      (CutLogger *logger,
                                                             const gchar *domain,
                                                             CutLogLevelFlags level,
                                                             const gchar *file,
                                                             guint line,
                                                             const gchar *function,
                                                             GTimeVal *time_value,
                                                             gcharの値。,
                                                             gpointer user_data);
    CutLogger *         cut_logger_new                      (void);
    void                cut_logger_log                      (CutLogger *logger,
                                                             const gchar *domain,
                                                             CutLogLevelFlags level,
                                                             const gchar *file,
                                                             guint line,
                                                             const gchar *function,
                                                             const gchar *format,
                                                             ...);
    void                cut_logger_log_va_list              (CutLogger *logger,
                                                             const gchar *domain,
                                                             CutLogLevelFlags level,
                                                             const gchar *file,
                                                             guint line,
                                                             const gchar *function,
                                                             const gchar *format,
                                                             va_list args);
    CutLogLevelFlags    cut_logger_get_target_level         (CutLogger *logger);
    CutLogLevelFlags    cut_logger_get_resolved_target_level
                                                            (CutLogger *logger);
    void                cut_logger_set_target_level         (CutLogger *logger,
                                                             CutLogLevelFlags level);
    gboolean            cut_logger_set_target_level_by_string
                                                            (CutLogger *logger,
                                                             const gchar *level_name,
                                                             GError **error);
    void                cut_logger_set_interesting_level    (CutLogger *logger,
                                                             const gchar *key,
                                                             CutLogLevelFlags level);
    CutLogLevelFlags    cut_logger_get_interesting_level    (CutLogger *logger);
    CutLogItemFlags     cut_logger_get_target_item          (CutLogger *logger);
    void                cut_logger_set_target_item          (CutLogger *logger,
                                                             CutLogItemFlags item);
    gboolean            cut_logger_set_target_item_by_string
                                                            (CutLogger *logger,
                                                             const gchar *item_name,
                                                             GError **error);
    void                cut_logger_connect_default_handler  (CutLogger *logger);
    void                cut_logger_disconnect_default_handler
                                                            (CutLogger *logger);
    #define             CUT_GLIB_LOG_DELEGATE               (domain)
    void                cut_glib_log_handler                (const gchar *log_domain,
                                                             GLogLevelFlags log_level,
                                                             gcharの値。,
                                                             gpointer user_data);

## 説明

## 詳細

### cut_log()

    #define             cut_log(level, format, ...)

cut_log

### cut_log_critical()

    #define             cut_log_critical(format, ...)

cut_log_critical

### cut_log_error()

    #define             cut_log_error(format, ...)

cut_log_error

### cut_log_warning()

    #define             cut_log_warning(format, ...)

cut_log_warning

### cut_log_message()

    #define             cut_log_message(format, ...)

cut_log_message

### cut_log_info()

    #define             cut_log_info(format, ...)

cut_log_info

### cut_log_debug()

    #define             cut_log_debug(format, ...)

cut_log_debug

### cut_log_trace()

    #define             cut_log_trace(format, ...)

cut_log_trace

### cut_set_log_level()

    #define             cut_set_log_level(level)

cut_set_log_level

### cut_get_log_level

    #define             cut_get_log_level()

cut_get_log_level

### cut_get_interesting_log_level

    #define             cut_get_interesting_log_level()

cut_get_interesting_log_level

### cut_need_log()

    #define             cut_need_log(level)

cut_need_log

### cut_need_critical_log

    #define             cut_need_critical_log()

cut_need_critical_log

### cut_need_error_log

    #define             cut_need_error_log()

cut_need_error_log

### cut_need_warning_log

    #define             cut_need_warning_log()

cut_need_warning_log

### cut_need_message_log

    #define             cut_need_message_log()

cut_need_message_log

### cut_need_info_log

    #define             cut_need_info_log()

cut_need_info_log

### cut_need_debug_log

    #define             cut_need_debug_log()

cut_need_debug_log

### cut_need_trace_log

    #define             cut_need_trace_log()

cut_need_trace_log

### enum CutLogLevelFlags

    typedef enum {
        CUT_LOG_LEVEL_DEFAULT    = 0,
        CUT_LOG_LEVEL_NONE       = 1 << 0,
        CUT_LOG_LEVEL_CRITICAL   = 1 << 1,
        CUT_LOG_LEVEL_ERROR      = 1 << 2,
        CUT_LOG_LEVEL_WARNING    = 1 << 3,
        CUT_LOG_LEVEL_MESSAGE    = 1 << 4,
        CUT_LOG_LEVEL_INFO       = 1 << 5,
        CUT_LOG_LEVEL_DEBUG      = 1 << 6,
        CUT_LOG_LEVEL_TRACE      = 1 << 7
    } CutLogLevelFlags;

`CUT_LOG_LEVEL_DEFAULT`

`CUT_LOG_LEVEL_NONE`

`CUT_LOG_LEVEL_CRITICAL`

`CUT_LOG_LEVEL_ERROR`

`CUT_LOG_LEVEL_WARNING`

`CUT_LOG_LEVEL_MESSAGE`

`CUT_LOG_LEVEL_INFO`

`CUT_LOG_LEVEL_DEBUG`

`CUT_LOG_LEVEL_TRACE`

CutLogLevelFlags

### CUT_LOG_LEVEL_ALL

    #define             CUT_LOG_LEVEL_ALL

CUT_LOG_LEVEL_ALL

### CUT_LOG_NULL_SAFE_STRING()

    #define CUT_LOG_NULL_SAFE_STRING(string) ((string) ? (string) : "(null)")

CUT_LOG_NULL_SAFE_STRING

### enum CutLogItemFlags

    typedef enum {
        CUT_LOG_ITEM_DEFAULT     = 0,
        CUT_LOG_ITEM_NONE        = 1 << 0,
        CUT_LOG_ITEM_DOMAIN      = 1 << 1,
        CUT_LOG_ITEM_LEVEL       = 1 << 2,
        CUT_LOG_ITEM_LOCATION    = 1 << 3,
        CUT_LOG_ITEM_TIME        = 1 << 4,
        CUT_LOG_ITEM_NAME        = 1 << 5,
        CUT_LOG_ITEM_PID         = 1 << 6
    } CutLogItemFlags;

`CUT_LOG_ITEM_DEFAULT`

`CUT_LOG_ITEM_NONE`

`CUT_LOG_ITEM_DOMAIN`

`CUT_LOG_ITEM_LEVEL`

`CUT_LOG_ITEM_LOCATION`

`CUT_LOG_ITEM_TIME`

`CUT_LOG_ITEM_NAME`

`CUT_LOG_ITEM_PID`

CutLogItemFlags

### CUT_LOG_ITEM_ALL

    #define             CUT_LOG_ITEM_ALL

CUT_LOG_ITEM_ALL

### enum CutLogColorize

    typedef enum {
        CUT_LOG_COLORIZE_DEFAULT,
        CUT_LOG_COLORIZE_NONE,
        CUT_LOG_COLORIZE_CONSOLE
    } CutLogColorize;

`CUT_LOG_COLORIZE_DEFAULT`

`CUT_LOG_COLORIZE_NONE`

`CUT_LOG_COLORIZE_CONSOLE`

CutLogColorize

### CUT_ENUM_ERROR

    #define CUT_ENUM_ERROR           (cut_enum_error_quark())

CUT_ENUM_ERROR

### CUT_FLAGS_ERROR

    #define CUT_FLAGS_ERROR          (cut_flags_error_quark())

CUT_FLAGS_ERROR

### enum CutEnumError

    typedef enum {
        CUT_ENUM_ERROR_NULL_NAME,
        CUT_ENUM_ERROR_UNKNOWN_NAME
    } CutEnumError;

`CUT_ENUM_ERROR_NULL_NAME`

`CUT_ENUM_ERROR_UNKNOWN_NAME`

CutEnumError

### enum CutFlagsError

    typedef enum {
        CUT_FLAGS_ERROR_NULL_NAME,
        CUT_FLAGS_ERROR_UNKNOWN_NAMES
    } CutFlagsError;

`CUT_FLAGS_ERROR_NULL_NAME`

`CUT_FLAGS_ERROR_UNKNOWN_NAMES`

CutFlagsError

### cut_enum_error_quark ()

    GQuark              cut_enum_error_quark                (void);

cut_enum_error_quark

### cut_flags_error_quark ()

    GQuark              cut_flags_error_quark               (void);

cut_flags_error_quark

### struct CutLogger

    struct CutLogger {
        GObject object;
    };

CutLogger

### struct CutLoggerClass

    struct CutLoggerClass {
        GObjectClass parent_class;

        void (*log) (CutLogger        *logger,
                     const gchar      *domain,
                     CutLogLevelFlags  level,
                     const gchar      *file,
                     guint             line,
                     const gchar      *function,
                     GTimeVal         *time_value,
                     const gchar      *message);
    };

CutLoggerClass

### cut_logger_error_quark ()

    GQuark              cut_logger_error_quark              (void);

cut_logger_error_quark

### cut_log_level_flags_from_string ()

    CutLogLevelFlags    cut_log_level_flags_from_string     (const gchar *level_name,
                                                             CutLogLevelFlags base_flags,
                                                             GError **error);

cut_log_level_flags_from_string

### cut_log_item_flags_from_string ()

    CutLogItemFlags     cut_log_item_flags_from_string      (const gchar *item_name,
                                                             CutLogItemFlags base_flags,
                                                             GError **error);

cut_log_item_flags_from_string

### cut_logger ()

    CutLogger *         cut_logger                          (void);

cut_logger

### cut_logger_default_log_handler ()

    void                cut_logger_default_log_handler      (CutLogger *logger,
                                                             const gchar *domain,
                                                             CutLogLevelFlags level,
                                                             const gchar *file,
                                                             guint line,
                                                             const gchar *function,
                                                             GTimeVal *time_value,
                                                             const gchar *message,
                                                             gpointer user_data);

cut_logger_default_log_handler

### cut_logger_new ()

    CutLogger *         cut_logger_new                      (void);

cut_logger_new

### cut_logger_log ()

    void                cut_logger_log                      (CutLogger *logger,
                                                             const gchar *domain,
                                                             CutLogLevelFlags level,
                                                             const gchar *file,
                                                             guint line,
                                                             const gchar *function,
                                                             const gchar *format,
                                                             ...);

cut_logger_log

### cut_logger_log_va_list ()

    void                cut_logger_log_va_list              (CutLogger *logger,
                                                             const gchar *domain,
                                                             CutLogLevelFlags level,
                                                             const gchar *file,
                                                             guint line,
                                                             const gchar *function,
                                                             const gchar *format,
                                                             va_list args);

cut_logger_log_va_list

### cut_logger_get_target_level ()

    CutLogLevelFlags    cut_logger_get_target_level         (CutLogger *logger);

cut_logger_get_target_level

### cut_logger_get_resolved_target_level ()

    CutLogLevelFlags    cut_logger_get_resolved_target_level
                                                            (CutLogger *logger);

cut_logger_get_resolved_target_level

### cut_logger_set_target_level ()

    void                cut_logger_set_target_level         (CutLogger *logger,
                                                             CutLogLevelFlags level);

cut_logger_set_target_level

### cut_logger_set_target_level_by_string ()

    gboolean            cut_logger_set_target_level_by_string
                                                            (CutLogger *logger,
                                                             const gchar *level_name,
                                                             GError **error);

cut_logger_set_target_level_by_string

### cut_logger_set_interesting_level ()

    void                cut_logger_set_interesting_level    (CutLogger *logger,
                                                             const gchar *key,
                                                             CutLogLevelFlags level);

cut_logger_set_interesting_level

### cut_logger_get_interesting_level ()

    CutLogLevelFlags    cut_logger_get_interesting_level    (CutLogger *logger);

cut_logger_get_interesting_level

### cut_logger_get_target_item ()

    CutLogItemFlags     cut_logger_get_target_item          (CutLogger *logger);

cut_logger_get_target_item

### cut_logger_set_target_item ()

    void                cut_logger_set_target_item          (CutLogger *logger,
                                                             CutLogItemFlags item);

cut_logger_set_target_item

### cut_logger_set_target_item_by_string ()

    gboolean            cut_logger_set_target_item_by_string
                                                            (CutLogger *logger,
                                                             const gchar *item_name,
                                                             GError **error);

cut_logger_set_target_item_by_string

### cut_logger_connect_default_handler ()

    void                cut_logger_connect_default_handler  (CutLogger *logger);

cut_logger_connect_default_handler

### cut_logger_disconnect_default_handler ()

    void                cut_logger_disconnect_default_handler
                                                            (CutLogger *logger);

cut_logger_disconnect_default_handler

### CUT_GLIB_LOG_DELEGATE()

    #define             CUT_GLIB_LOG_DELEGATE(domain)

CUT_GLIB_LOG_DELEGATE

### cut_glib_log_handler ()

    void                cut_glib_log_handler                (const gchar *log_domain,
                                                             GLogLevelFlags log_level,
                                                             const gchar *message,
                                                             gpointer user_data);

cut_glib_log_handler