
Syslog calls this level "notice" and I prefer it because we use it to display significant messages that are not warnings, but they are not really "standard", as GLib wants them to be. There is nothing "standard" about log messages in general. Also, make these notice messages be enabled at debug level 2, together with warnings. The default log.level is 2 and it is a good idea to show notices by default too. Finally, show them in the log with "N" and also change criticals to be shown with "E", meaning "error"... Then promote G_LOG_LEVEL_ERROR messages to be shown with "F", meaning "fatal", because in fact these messages are always fatal and always call abort(). Still, keep the term "critical" in the functions to make sure that whoever uses them is aware that this level is only for critical conditions and not suitable to display any kind of error.
57 lines
1.8 KiB
ReStructuredText
57 lines
1.8 KiB
ReStructuredText
.. _lua_log_api:
|
|
|
|
Debug Logging
|
|
=============
|
|
|
|
.. function:: Log.warning(object, message)
|
|
|
|
Logs a warning message, like :c:macro:`wp_warning_object`
|
|
|
|
:param object: optional object to associate the message with; you
|
|
may skip this and just start with the *message* as the first parameter
|
|
:type object: GObject or GBoxed
|
|
:param string message: the warning message to log
|
|
|
|
.. function:: Log.notice(object, message)
|
|
|
|
Logs a notice message, like :c:macro:`wp_notice_object`
|
|
|
|
:param object: optional object to associate the message with; you
|
|
may skip this and just start with the *message* as the first parameter
|
|
:type object: GObject or GBoxed
|
|
:param string message: the normal message to log
|
|
|
|
.. function:: Log.info(object, message)
|
|
|
|
Logs a info message, like :c:macro:`wp_info_object`
|
|
|
|
:param object: optional object to associate the message with; you
|
|
may skip this and just start with the *message* as the first parameter
|
|
:type object: GObject or GBoxed
|
|
:param string message: the info message to log
|
|
|
|
.. function:: Log.debug(object, message)
|
|
|
|
Logs a debug message, like :c:macro:`wp_debug_object`
|
|
|
|
:param object: optional object to associate the message with; you
|
|
may skip this and just start with the *message* as the first parameter
|
|
:type object: GObject or GBoxed
|
|
:param string message: the debug message to log
|
|
|
|
.. function:: Log.trace(object, message)
|
|
|
|
Logs a trace message, like :c:macro:`wp_trace_object`
|
|
|
|
:param object: optional object to associate the message with; you
|
|
may skip this and just start with the *message* as the first parameter
|
|
:type object: GObject or GBoxed
|
|
:param string message: the trace message to log
|
|
|
|
.. function:: Debug.dump_table(t)
|
|
|
|
Prints a table with all its contents, recursively, to stdout
|
|
for debugging purposes
|
|
|
|
:param table t: any table
|