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 ()
MilterLogger * | milter_logger_get_default ()
void | milter_logger_default_log_handler ()
MilterLogger * | milter_logger_new ()
void | milter_logger_log ()
void | milter_logger_log_va_list ()
void | milter_logger_log_literal ()
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
char * | 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
#define | MILTER_TYPE_LOGGER
struct | MilterLoggerClass
| MilterLogger

## オブジェクト階層

    GObject
        ╰── MilterLogger

## 説明

## Functions

### milter_log()

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

milter_log

### milter_critical()

    #define             milter_critical(format, ...)

milter_critical

### milter_error()

    #define             milter_error(format, ...)

milter_error

### milter_warning()

    #define             milter_warning(format, ...)

milter_warning

### milter_message()

    #define             milter_message(format, ...)

milter_message

### milter_info()

    #define             milter_info(format, ...)

milter_info

### milter_debug()

    #define             milter_debug(format, ...)

milter_debug

### milter_trace()

    #define             milter_trace(format, ...)

milter_trace

### milter_statistics()

    #define             milter_statistics(format, ...)

milter_statistics

### milter_profile()

    #define             milter_profile(format, ...)

milter_profile

### milter_set_log_level()

    #define             milter_set_log_level(level)

milter_set_log_level

### milter_get_log_level

    #define             milter_get_log_level()

milter_get_log_level

### milter_get_interesting_log_level

    #define             milter_get_interesting_log_level()

milter_get_interesting_log_level

### milter_need_log()

    #define             milter_need_log(level)

milter_need_log

### milter_need_critical_log

    #define             milter_need_critical_log()

milter_need_critical_log

### milter_need_error_log

    #define             milter_need_error_log()

milter_need_error_log

### milter_need_warning_log

    #define             milter_need_warning_log()

milter_need_warning_log

### milter_need_message_log

    #define             milter_need_message_log()

milter_need_message_log

### milter_need_info_log

    #define             milter_need_info_log()

milter_need_info_log

### milter_need_debug_log

    #define             milter_need_debug_log()

milter_need_debug_log

### milter_need_trace_log

    #define             milter_need_trace_log()

milter_need_trace_log

### milter_need_statistics_log

    #define             milter_need_statistics_log()

milter_need_statistics_log

### milter_need_profile_log

    #define             milter_need_profile_log()

milter_need_profile_log

### MILTER_LOG_NULL_SAFE_STRING()

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

MILTER_LOG_NULL_SAFE_STRING

### milter_logger_error_quark ()

    GQuark
    milter_logger_error_quark (void);

milter_logger_error_quark

### milter_log_level_flags_from_string ()

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

milter_log_level_flags_from_string

### milter_log_item_flags_from_string ()

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

milter_log_item_flags_from_string

### milter_logger ()

    MilterLogger *
    milter_logger (void);

#### Returns

The singleton logger in this process.

[transfer none]

milter_logger

### milter_logger_get_default ()

    MilterLogger *
    milter_logger_get_default (void);

This is same as `milter_logger()`.

#### Returns

The singleton logger in this process.

[transfer none]

Since: 2.1.6

milter_logger_get_default

### 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_default_log_handler

### milter_logger_new ()

    MilterLogger *
    milter_logger_new (void);

milter_logger_new

### 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

### 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_log_va_list

### milter_logger_log_literal ()

    void
    milter_logger_log_literal (MilterLogger *logger,
                               const gchar *domain,
                               MilterLogLevelFlags level,
                               const gchar *file,
                               guint line,
                               const gchar *function,
                               const gchar *message);

This is for language bindings.

#### Parameters

logger | A MilterLogger. |
domain | A log domain. |
level | A log level. |
file | A file name where the log is happened. |
line | A line number where the log is happened. |
function | A function name where the log is happened. |
message | A message to be logged. |

Since: 2.1.6

milter_logger_log_literal

### milter_logger_reopen ()

    void
    milter_logger_reopen (MilterLogger *logger);

milter_logger_reopen

### milter_logger_get_target_level ()

    MilterLogLevelFlags
    milter_logger_get_target_level (MilterLogger *logger);

milter_logger_get_target_level

### milter_logger_get_resolved_target_level ()

    MilterLogLevelFlags
    milter_logger_get_resolved_target_level
                                   (MilterLogger *logger);

milter_logger_get_resolved_target_level

### milter_logger_set_target_level ()

    void
    milter_logger_set_target_level (MilterLogger *logger,
                                    MilterLogLevelFlags level);

milter_logger_set_target_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_target_level_by_string

### milter_logger_set_interesting_level ()

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

milter_logger_set_interesting_level

### milter_logger_get_interesting_level ()

    MilterLogLevelFlags
    milter_logger_get_interesting_level (MilterLogger *logger);

milter_logger_get_interesting_level

### milter_logger_get_target_item ()

    MilterLogItemFlags
    milter_logger_get_target_item (MilterLogger *logger);

milter_logger_get_target_item

### milter_logger_set_target_item ()

    void
    milter_logger_set_target_item (MilterLogger *logger,
                                   MilterLogItemFlags item);

milter_logger_set_target_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_set_target_item_by_string

### milter_logger_get_path ()

    const gchar *
    milter_logger_get_path (MilterLogger *logger);

milter_logger_get_path

### milter_logger_set_path ()

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

Sets output path. If path is `NULL` or `"-"`, log messages are outputted to the standard output.

#### Parameters

logger | A MilterLogger. |
path | An output path. | [nullable]
error | Return location for a GError or `NULL`. | [nullable]

#### Returns

`TRUE` on success, `FALSE` otherwise.

milter_logger_set_path

### milter_logger_connect_default_handler ()

    void
    milter_logger_connect_default_handler (MilterLogger *logger);

milter_logger_connect_default_handler

### milter_logger_disconnect_default_handler ()

    void
    milter_logger_disconnect_default_handler
                                   (MilterLogger *logger);

milter_logger_disconnect_default_handler

### MILTER_GLIB_LOG_DELEGATE()

    #define             MILTER_GLIB_LOG_DELEGATE(domain)

MILTER_GLIB_LOG_DELEGATE

### milter_glib_log_handler ()

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

milter_glib_log_handler

## 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 |  |

MilterLogLevelFlags

### MILTER_LOG_LEVEL_ALL

    #define             MILTER_LOG_LEVEL_ALL

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 |  |

MilterLogItemFlags

### MILTER_LOG_ITEM_ALL

    #define             MILTER_LOG_ITEM_ALL

MILTER_LOG_ITEM_ALL

### enum MilterLogColorize

#### Members

MILTER_LOG_COLORIZE_DEFAULT |  |
MILTER_LOG_COLORIZE_NONE |  |
MILTER_LOG_COLORIZE_CONSOLE |  |

MilterLogColorize

### MILTER_TYPE_LOGGER

    #define MILTER_TYPE_LOGGER            (milter_logger_get_type())

MILTER_TYPE_LOGGER

### struct MilterLoggerClass

    struct MilterLoggerClass {
        GObjectClass parent_class;

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

MilterLoggerClass

### MilterLogger

    typedef struct _MilterLogger MilterLogger;

MilterLogger

## プロパティ詳細

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

    “interesting-level”        MilterLogLevelFlags

The interesting log level.

Owner: MilterLogger

Flags: Read

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

MilterLogger:interesting-level

### The `“path”` property

    “path”                     char *

The log output path.

Owner: MilterLogger

Flags: Read

デフォルト値: NULL

MilterLogger:path

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

    “target-item”              MilterLogItemFlags

The target log item.

Owner: MilterLogger

Flags: Read / Write

MilterLogger:target-item

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

    “target-level”             MilterLogLevelFlags

The target log level.

Owner: MilterLogger

Flags: Read / Write

MilterLogger:target-level

## シグナル詳細

### The `“log”` signal

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

Flags: Run Last

MilterLogger::log