MilterLogger
3
milter managerライブラリ

# MilterLogger

## Functions

#define | milter_log()
#define | milter_critical()
#define | milter_error()
#define | milter_warning()
#define | milter_message()
#define | milter_info()
#define | milter_debug()
#define | milter_trace()
#define | milter_statistics()
#define | milter_profile()
#define | milter_set_log_level()
#define | milter_get_log_level
#define | milter_get_interesting_log_level
#define | milter_need_log()
#define | milter_need_critical_log
#define | milter_need_error_log
#define | milter_need_warning_log
#define | milter_need_message_log
#define | milter_need_info_log
#define | milter_need_debug_log
#define | milter_need_trace_log
#define | milter_need_statistics_log
#define | milter_need_profile_log
#define | MILTER_LOG_NULL_SAFE_STRING()
GQuark | milter_logger_error_quark ()
MilterLogLevelFlags | milter_log_level_flags_from_string ()
MilterLogItemFlags | milter_log_item_flags_from_string ()
MilterLogger * | milter_logger ()
void | milter_logger_default_log_handler ()
MilterLogger * | milter_logger_new ()
void | milter_logger_log ()
void | milter_logger_log_va_list ()
void | milter_logger_reopen ()
MilterLogLevelFlags | milter_logger_get_target_level ()
MilterLogLevelFlags | milter_logger_get_resolved_target_level ()
void | milter_logger_set_target_level ()
gboolean | milter_logger_set_target_level_by_string ()
void | milter_logger_set_interesting_level ()
MilterLogLevelFlags | milter_logger_get_interesting_level ()
MilterLogItemFlags | milter_logger_get_target_item ()
void | milter_logger_set_target_item ()
gboolean | milter_logger_set_target_item_by_string ()
const gchar * | milter_logger_get_path ()
gboolean | milter_logger_set_path ()
void | milter_logger_connect_default_handler ()
void | milter_logger_disconnect_default_handler ()
#define | MILTER_GLIB_LOG_DELEGATE()
void | milter_glib_log_handler ()

## プロパティ

MilterLogLevelFlags | interesting-level | Read
gchar * | path | Read
MilterLogItemFlags | target-item | Read / Write
MilterLogLevelFlags | target-level | Read / Write

## シグナル

void | log | Run Last

## Types and Values

enum | MilterLogLevelFlags
#define | MILTER_LOG_LEVEL_ALL
enum | MilterLogItemFlags
#define | MILTER_LOG_ITEM_ALL
enum | MilterLogColorize

## オブジェクト階層

        GEnum
        ╰── MilterLogColorize
        GFlags
        ├── MilterLogItemFlags
        ╰── MilterLogLevelFlags
        GObject
        ╰── MilterLogger

## 説明

## Functions

### milter_log()

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

### milter_critical()

    #define             milter_critical(format, ...)

### milter_error()

    #define             milter_error(format, ...)

### milter_warning()

    #define             milter_warning(format, ...)

### milter_message()

    #define             milter_message(format, ...)

### milter_info()

    #define             milter_info(format, ...)

### milter_debug()

    #define             milter_debug(format, ...)

### milter_trace()

    #define             milter_trace(format, ...)

### milter_statistics()

    #define             milter_statistics(format, ...)

### milter_profile()

    #define             milter_profile(format, ...)

### milter_set_log_level()

    #define             milter_set_log_level(level)

### milter_get_log_level

    #define             milter_get_log_level()

### milter_get_interesting_log_level

    #define             milter_get_interesting_log_level()

### milter_need_log()

    #define             milter_need_log(level)

### milter_need_critical_log

    #define             milter_need_critical_log()

### milter_need_error_log

    #define             milter_need_error_log()

### milter_need_warning_log

    #define             milter_need_warning_log()

### milter_need_message_log

    #define             milter_need_message_log()

### milter_need_info_log

    #define             milter_need_info_log()

### milter_need_debug_log

    #define             milter_need_debug_log()

### milter_need_trace_log

    #define             milter_need_trace_log()

### milter_need_statistics_log

    #define             milter_need_statistics_log()

### milter_need_profile_log

    #define             milter_need_profile_log()

### MILTER_LOG_NULL_SAFE_STRING()

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

### milter_logger_error_quark ()

    GQuark
    milter_logger_error_quark (void);

### milter_log_level_flags_from_string ()

    MilterLogLevelFlags
    milter_log_level_flags_from_string (const gchar *level_name,
                                        MilterLogLevelFlags base_flags,
                                        GError **error);

### milter_log_item_flags_from_string ()

    MilterLogItemFlags
    milter_log_item_flags_from_string (const gchar *item_name,
                                       MilterLogItemFlags base_flags,
                                       GError **error);

### milter_logger ()

    MilterLogger *
    milter_logger (void);

### milter_logger_default_log_handler ()

    void
    milter_logger_default_log_handler (MilterLogger *logger,
                                       const gchar *domain,
                                       MilterLogLevelFlags level,
                                       const gchar *file,
                                       guint line,
                                       const gchar *function,
                                       GTimeVal *time_value,
                                       const gchar *message,
                                       gpointer user_data);

### milter_logger_new ()

    MilterLogger *
    milter_logger_new (void);

### milter_logger_log ()

    void
    milter_logger_log (MilterLogger *logger,
                       const gchar *domain,
                       MilterLogLevelFlags level,
                       const gchar *file,
                       guint line,
                       const gchar *function,
                       const gchar *format,
                       ...);

### milter_logger_log_va_list ()

    void
    milter_logger_log_va_list (MilterLogger *logger,
                               const gchar *domain,
                               MilterLogLevelFlags level,
                               const gchar *file,
                               guint line,
                               const gchar *function,
                               const gchar *format,
                               va_list args);

### milter_logger_reopen ()

    void
    milter_logger_reopen (MilterLogger *logger);

### milter_logger_get_target_level ()

    MilterLogLevelFlags
    milter_logger_get_target_level (MilterLogger *logger);

### milter_logger_get_resolved_target_level ()

    MilterLogLevelFlags
    milter_logger_get_resolved_target_level
                                   (MilterLogger *logger);

### milter_logger_set_target_level ()

    void
    milter_logger_set_target_level (MilterLogger *logger,
                                    MilterLogLevelFlags level);

### milter_logger_set_target_level_by_string ()

    gboolean
    milter_logger_set_target_level_by_string
                                   (MilterLogger *logger,
                                    const gchar *level_name,
                                    GError **error);

### milter_logger_set_interesting_level ()

    void
    milter_logger_set_interesting_level (MilterLogger *logger,
                                         const gchar *key,
                                         MilterLogLevelFlags level);

### milter_logger_get_interesting_level ()

    MilterLogLevelFlags
    milter_logger_get_interesting_level (MilterLogger *logger);

### milter_logger_get_target_item ()

    MilterLogItemFlags
    milter_logger_get_target_item (MilterLogger *logger);

### milter_logger_set_target_item ()

    void
    milter_logger_set_target_item (MilterLogger *logger,
                                   MilterLogItemFlags item);

### milter_logger_set_target_item_by_string ()

    gboolean
    milter_logger_set_target_item_by_string
                                   (MilterLogger *logger,
                                    const gchar *item_name,
                                    GError **error);

### milter_logger_get_path ()

    const gchar *
    milter_logger_get_path (MilterLogger *logger);

### milter_logger_set_path ()

    gboolean
    milter_logger_set_path (MilterLogger *logger,
                            const gchar *path,
                            GError **error);

### milter_logger_connect_default_handler ()

    void
    milter_logger_connect_default_handler (MilterLogger *logger);

### milter_logger_disconnect_default_handler ()

    void
    milter_logger_disconnect_default_handler
                                   (MilterLogger *logger);

### MILTER_GLIB_LOG_DELEGATE()

    #define             MILTER_GLIB_LOG_DELEGATE(domain)

### milter_glib_log_handler ()

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

## Types and Values

### enum MilterLogLevelFlags

#### Members

MILTER_LOG_LEVEL_DEFAULT |  |
MILTER_LOG_LEVEL_NONE |  |
MILTER_LOG_LEVEL_CRITICAL |  |
MILTER_LOG_LEVEL_ERROR |  |
MILTER_LOG_LEVEL_WARNING |  |
MILTER_LOG_LEVEL_MESSAGE |  |
MILTER_LOG_LEVEL_INFO |  |
MILTER_LOG_LEVEL_DEBUG |  |
MILTER_LOG_LEVEL_TRACE |  |
MILTER_LOG_LEVEL_STATISTICS |  |
MILTER_LOG_LEVEL_PROFILE |  |

### MILTER_LOG_LEVEL_ALL

    #define             MILTER_LOG_LEVEL_ALL

### enum MilterLogItemFlags

#### Members

MILTER_LOG_ITEM_DEFAULT |  |
MILTER_LOG_ITEM_NONE |  |
MILTER_LOG_ITEM_DOMAIN |  |
MILTER_LOG_ITEM_LEVEL |  |
MILTER_LOG_ITEM_LOCATION |  |
MILTER_LOG_ITEM_TIME |  |
MILTER_LOG_ITEM_NAME |  |
MILTER_LOG_ITEM_PID |  |

### MILTER_LOG_ITEM_ALL

    #define             MILTER_LOG_ITEM_ALL

### enum MilterLogColorize

#### Members

MILTER_LOG_COLORIZE_DEFAULT |  |
MILTER_LOG_COLORIZE_NONE |  |
MILTER_LOG_COLORIZE_CONSOLE |  |

## プロパティ詳細

### The `“interesting-level”` property

      “interesting-level”        MilterLogLevelFlags

The interesting log level.

Flags: Read

Default value: MILTER_LOG_LEVEL_CRITICAL | MILTER_LOG_LEVEL_ERROR | MILTER_LOG_LEVEL_WARNING | MILTER_LOG_LEVEL_MESSAGE | MILTER_LOG_LEVEL_STATISTICS

### The `“path”` property

      “path”                     gchar *

The log output path.

Flags: Read

デフォルト値: NULL

### The `“target-item”` property

      “target-item”              MilterLogItemFlags

The target log item.

Flags: Read / Write

### The `“target-level”` property

      “target-level”             MilterLogLevelFlags

The target log level.

Flags: Read / Write

## シグナル詳細

### The `“log”` signal

    void
    user_function (MilterLogger       *milterlogger,
                   gchar              *arg1,
                   MilterLogLevelFlags arg2,
                   gchar              *arg3,
                   guint               arg4,
                   gchar              *arg5,
                   gpointer            arg6,
                   gchar              *arg7,
                   gpointer            user_data)

Flags: Run Last