staticLOG4C_INLINEvoid__log4c_category_trace(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with trace priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_TRACE.
staticLOG4C_INLINEvoidlog4c_category_alert(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with alert priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_ALERT.
staticLOG4C_INLINEvoidlog4c_category_crit(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with crit priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_CRIT.
staticLOG4C_INLINEvoidlog4c_category_debug(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with debug priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_DEBUG.
voidlog4c_category_delete(log4c_category_t*a_category)
Destructor for a log4c_category_t.
Parametersa_category the log4c_category_t object
staticLOG4C_INLINEvoidlog4c_category_error(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with error priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_ERROR.
staticLOG4C_INLINEvoidlog4c_category_fatal(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with fatal priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_FATAL.
log4c_category_t*log4c_category_get(constchar*a_name)
Instantiate a log4c_category_t with name name. This method does not set priority of the category which is
by default LOG4C_PRIORITY_NOTSET.
Parametersa_name The name of the category to retrieve.
Bug
the root category name should be '' not 'root'. *
intlog4c_category_get_additivity(constlog4c_category_t*a_category)
Get the additivity flag for this log4c_category_t..
Parametersa_category the log4c_category_t object
Returns
the category additivity
conststruct__log4c_appender*log4c_category_get_appender(constlog4c_category_t*a_category)
Returns the Appender for this log4c_category_t, or NULL if no Appender has been set.
Parametersa_category the log4c_category_t object
Returns
The Appender.
intlog4c_category_get_chainedpriority(constlog4c_category_t*a_category)
Starting from this category, search the category hierarchy for a set priority and return it. Otherwise,
return the priority of the root category.
Parametersa_category the log4c_category_t object
Todo
the log4c_category_t is designed so that this method executes as quickly as possible. It could even
be faster if the set priority was propagated through the children hierarchy of a category.
References LOG4C_PRIORITY_NOTSET, and LOG4C_PRIORITY_UNKNOWN.
constchar*log4c_category_get_name(constlog4c_category_t*a_category)
Return the category name.
Parametersa_category the log4c_category_t object
Returns
the category name.
intlog4c_category_get_priority(constlog4c_category_t*a_category)
Returns the assigned Priority, if any, for this log4c_category_t.
Parametersa_category the log4c_category_t object
Returns
Priority - the assigned Priority, can be LOG4C_PRIORITY_NOTSET
References LOG4C_PRIORITY_UNKNOWN.
staticLOG4C_INLINEvoidlog4c_category_info(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with info priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_INFO.
staticintlog4c_category_is_alert_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_ALERT.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_ALERT.
staticintlog4c_category_is_crit_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_CRIT.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_CRIT.
staticintlog4c_category_is_debug_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_DEBUG.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_DEBUG.
staticintlog4c_category_is_error_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_ERROR.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_ERROR.
staticintlog4c_category_is_fatal_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_FATAL.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_FATAL.
staticintlog4c_category_is_info_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_INFO.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_INFO.
staticintlog4c_category_is_notice_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_NOTICE.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_NOTICE.
staticintlog4c_category_is_priority_enabled(constlog4c_category_t*a_category,inta_priority)[inline],[static]
Returns true if the chained priority of the log4c_category_t is equal to or higher than given priority.
Parametersa_category the log4c_category_t object
a_priority The priority to compare with.
Returns
whether logging is enable for this priority.
References log4c_category_get_chainedpriority().
staticintlog4c_category_is_trace_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_TRACE.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_TRACE.
staticintlog4c_category_is_warn_enabled(constlog4c_category_t*a_category)[inline],[static]
Return true if the category will log messages with priority LOG4C_PRIORITY_WARN.
Parametersa_category the log4c_category_t object
Returns
Whether the category will log.
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_WARN.
intlog4c_category_list(log4c_category_t**a_cats,inta_ncats)
Fill in an array with the log4c categories.
Parametersa_cats array of categories that will be filled
a_ncats number of categories in the array
Returns
-1 if it fails or the number of available categories in log4c.
staticLOG4C_INLINEvoidlog4c_category_log(constlog4c_category_t*a_category,inta_priority,constchar*a_format,...)[static]
Log a message with the specified priority.
Parametersa_category the log4c_category_t object
a_priority The priority of this log message.
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled().
staticLOG4C_INLINEvoidlog4c_category_log_locinfo(constlog4c_category_t*a_category,constlog4c_location_info_t*a_locinfo,inta_priority,constchar*a_format,...)[static]
Log a message with the specified priority and a user location info.
Parametersa_category the log4c_category_t object
a_locinfo a user location info
a_priority The priority of this log message.
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled().
log4c_category_t*log4c_category_new(constchar*a_name)
Constructor for a log4c_category_t.
Parametersa_name the category name
Returns
a log4c_category object
Warning
this method should not be called directly. You should use the log4c_category_get() method in order to
preserve the categories hierarchy.
References LOG4C_PRIORITY_NOTSET.
staticLOG4C_INLINEvoidlog4c_category_notice(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with notice priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_NOTICE.
voidlog4c_category_print(constlog4c_category_t*a_category,FILE*a_stream)
prints the log4c_category_t object on a stream
Parametersa_category the log4c_category_t object
a_stream The stream
intlog4c_category_set_additivity(log4c_category_t*a_category,inta_additivity)
Sets a new additivity flag for this category.
Parametersa_category the log4c_category_t object
a_additivity the new category additivity
Returns
the previous category additivity
conststruct__log4c_appender*log4c_category_set_appender(log4c_category_t*this,log4c_appender_t*a_appender)
Sets a new appender for this category.
Parametersa_category the log4c_category_t object
a_appender the new category appender
Returns
the previous category appender
Todo
need multiple appenders per category
intlog4c_category_set_priority(log4c_category_t*a_category,inta_priority)
Sets a new priority of this category.
Parametersa_category the log4c_category_t object
a_priority the new priority to set. Use LOG4C_PRIORITY_NOTSET to let the category use its parents
priority as effective priority.
Returns
the previous category priority
References LOG4C_PRIORITY_UNKNOWN.
staticLOG4C_INLINEvoidlog4c_category_warn(constlog4c_category_t*a_category,constchar*a_format,...)[static]
Log a message with warn priority.
Parametersa_category the log4c_category_t object
a_format Format specifier for the string to write in the log file.
... The arguments for a_format
References log4c_category_is_priority_enabled(), and LOG4C_PRIORITY_WARN.