Top | ![]() |
![]() |
![]() |
![]() |
void | ide_log_init () |
void | ide_log_increase_verbosity () |
gint | ide_log_get_verbosity () |
void | ide_log_set_verbosity () |
void | ide_log_shutdown () |
This module manages the logging facilities in Builder. It involves formatting the standard output and error logs as well as filtering logs based on their GLogLevelFlags.
Generally speaking, you want to continue using the GLib logging API
such as g_debug()
, g_warning()
, g_message()
, or g_error()
. These functions
will redirect their logging information to this module who will format
the log message appropriately.
If you are writing code for Builder that is in C, you want to ensure you
set the G_LOG_DOMAIN
define at the top of your file (after the license)
as such:
void ide_log_init (gboolean stdout_
,const gchar *filename
);
Initializes the logging subsystem. This should be called from the application entry point only. Secondary calls to this function will do nothing.
stdout_ |
Indicates logging should be written to stdout. |
|
filename |
An optional file in which to store logs. |
Since: 3.16
void
ide_log_increase_verbosity (void
);
Increases the amount of logging that will occur. By default, only warning and above will be displayed.
Calling this once will cause G_LOG_LEVEL_MESSAGE
to be displayed.
Calling this twice will cause G_LOG_LEVEL_INFO
to be displayed.
Calling this thrice will cause G_LOG_LEVEL_DEBUG
to be displayed.
Calling this four times will cause IDE_LOG_LEVEL_TRACE
to be displayed.
Note that many DEBUG and TRACE level log messages are only compiled into debug builds, and therefore will not be available in release builds.
This method is meant to be called for every -v provided on the command line.
Calling this method more than four times is acceptable.
Since: 3.20
gint
ide_log_get_verbosity (void
);
Retrieves the log verbosity, which is the number of times -v was provided on the command line.
Since: 3.20
void
ide_log_set_verbosity (gint level
);
Sets the explicit verbosity. Generally you want to use
ide_log_increase_verbosity()
instead of this function.
Since: 3.20