|
G_BEGIN_DECLS GLIB_AVAILABLE_IN_ALL gsize | g_printf_string_upper_bound (const gchar *format, va_list args) G_GNUC_PRINTF(1 |
|
GLIB_AVAILABLE_IN_ALL guint | g_log_set_handler (const gchar *log_domain, GLogLevelFlags log_levels, GLogFunc log_func, gpointer user_data) |
|
GLIB_AVAILABLE_IN_2_46 guint | g_log_set_handler_full (const gchar *log_domain, GLogLevelFlags log_levels, GLogFunc log_func, gpointer user_data, GDestroyNotify destroy) |
|
GLIB_AVAILABLE_IN_ALL void | g_log_remove_handler (const gchar *log_domain, guint handler_id) |
|
GLIB_AVAILABLE_IN_ALL void | g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data) |
|
GLIB_AVAILABLE_IN_ALL GLogFunc | g_log_set_default_handler (GLogFunc log_func, gpointer user_data) |
|
GLIB_AVAILABLE_IN_ALL void | g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format,...) G_GNUC_PRINTF(3 |
|
GLIB_AVAILABLE_IN_ALL void GLIB_AVAILABLE_IN_ALL void | g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args) G_GNUC_PRINTF(3 |
|
GLIB_AVAILABLE_IN_ALL void GLIB_AVAILABLE_IN_ALL void GLIB_AVAILABLE_IN_ALL GLogLevelFlags | g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask) |
|
GLIB_AVAILABLE_IN_ALL GLogLevelFlags | g_log_set_always_fatal (GLogLevelFlags fatal_mask) |
|
GLIB_AVAILABLE_IN_2_50 void | g_log_structured (const gchar *log_domain, GLogLevelFlags log_level,...) |
|
GLIB_AVAILABLE_IN_2_50 void | g_log_structured_array (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields) |
|
GLIB_AVAILABLE_IN_2_50 void | g_log_variant (const gchar *log_domain, GLogLevelFlags log_level, GVariant *fields) |
|
GLIB_AVAILABLE_IN_2_50 void | g_log_set_writer_func (GLogWriterFunc func, gpointer user_data, GDestroyNotify user_data_free) |
|
GLIB_AVAILABLE_IN_2_50 gboolean | g_log_writer_supports_color (gint output_fd) |
|
GLIB_AVAILABLE_IN_2_50 gboolean | g_log_writer_is_journald (gint output_fd) |
|
GLIB_AVAILABLE_IN_2_50 gchar * | g_log_writer_format_fields (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gboolean use_color) |
|
GLIB_AVAILABLE_IN_2_80 GLogWriterOutput | g_log_writer_syslog (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data) |
|
GLIB_AVAILABLE_IN_2_50 GLogWriterOutput | g_log_writer_journald (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data) |
|
GLIB_AVAILABLE_IN_2_50 GLogWriterOutput | g_log_writer_standard_streams (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data) |
|
GLIB_AVAILABLE_IN_2_50 GLogWriterOutput | g_log_writer_default (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data) |
|
GLIB_AVAILABLE_IN_2_68 void | g_log_writer_default_set_use_stderr (gboolean use_stderr) |
|
GLIB_AVAILABLE_IN_2_68 gboolean | g_log_writer_default_would_drop (GLogLevelFlags log_level, const char *log_domain) |
|
GLIB_AVAILABLE_IN_2_80 void | g_log_writer_default_set_debug_domains (const gchar *const *domains) |
|
GLIB_AVAILABLE_IN_2_72 gboolean | g_log_get_debug_enabled (void) |
|
GLIB_AVAILABLE_IN_2_72 void | g_log_set_debug_enabled (gboolean enabled) |
|
void | _g_log_fallback_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data) |
|
GLIB_AVAILABLE_IN_ALL void | g_return_if_fail_warning (const char *log_domain, const char *pretty_function, const char *expression) G_ANALYZER_NORETURN |
|
GLIB_AVAILABLE_IN_ALL void | g_warn_message (const char *domain, const char *file, int line, const char *func, const char *warnexpr) G_ANALYZER_NORETURN |
|
G_NORETURN GLIB_DEPRECATED void | g_assert_warning (const char *log_domain, const char *file, const int line, const char *pretty_function, const char *expression) |
|
GLIB_AVAILABLE_IN_2_56 void | g_log_structured_standard (const gchar *log_domain, GLogLevelFlags log_level, const gchar *file, const gchar *line, const gchar *func, const gchar *message_format,...) G_GNUC_PRINTF(6 |
|
GLIB_AVAILABLE_IN_ALL void | g_print (const gchar *format,...) G_GNUC_PRINTF(1 |
|
GLIB_AVAILABLE_IN_ALL void GLIB_AVAILABLE_IN_ALL GPrintFunc | g_set_print_handler (GPrintFunc func) |
|
GLIB_AVAILABLE_IN_ALL void | g_printerr (const gchar *format,...) G_GNUC_PRINTF(1 |
|
GLIB_AVAILABLE_IN_ALL void GLIB_AVAILABLE_IN_ALL GPrintFunc | g_set_printerr_handler (GPrintFunc func) |
|
#define g_warning_once |
( |
| ... | ) |
|
Value:
static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \
0, 1)) \
g_warning (__VA_ARGS__); \
} G_STMT_END \
GLIB_AVAILABLE_MACRO_IN_2_64
#define g_atomic_int_compare_and_exchange(atomic, oldval, newval)
#define G_PASTE(identifier1, identifier2)
g_warning_once: ...: format string, followed by parameters to insert into the format string (as with printf())
Logs a warning only once.
g_warning_once() calls g_warning() with the passed message the first time the statement is executed; subsequent times it is a no-op.
Note! On platforms where the compiler doesn't support variadic macros, the warning is printed each time instead of only once.
Since: 2.64
Definition at line 497 of file gmessages.h.
497#define g_warning_once(...) \
498 G_STMT_START { \
499 static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \
500 if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \
501 0, 1)) \
502 g_warning (__VA_ARGS__); \
503 } G_STMT_END \
504 GLIB_AVAILABLE_MACRO_IN_2_64
GLogField: @key: field name (UTF-8 string) @value: field value (arbitrary bytes) @length: length of @value, in bytes, or -1 if it is nul-terminated
Structure representing a single field in a structured log entry. See g_log_structured() for details.
Log fields may contain arbitrary values, including binary with embedded nul bytes. If the field contains a string, the string must be UTF-8 encoded and have a trailing nul byte. Otherwise, @length must be set to a non-negative value.
Since: 2.50
Definition at line 158 of file gmessages.h.
GLogWriterFunc: @log_level: log level of the message @fields: (array length=n_fields): fields forming the message @n_fields: number of @fields @user_data: user data passed to g_log_set_writer_func()
Writer function for log entries. A log entry is a collection of one or more #GLogFields, using the standard field names from journal specification. See g_log_structured() for more information.
Writer functions must ignore fields which they do not recognise, unless they can write arbitrary binary output, as field values may be arbitrary binary.
@log_level is guaranteed to be included in @fields as the PRIORITY
field, but is provided separately for convenience of deciding whether or where to output the log entry.
Writer functions should return G_LOG_WRITER_HANDLED if they handled the log message successfully or if they deliberately ignored it. If there was an error handling the message (for example, if the writer function is meant to send messages to a remote logging server and there is a network error), it should return G_LOG_WRITER_UNHANDLED. This allows writer functions to be chained and fall back to simpler handlers in case of failure.
Returns: G_LOG_WRITER_HANDLED if the log entry was handled successfully; G_LOG_WRITER_UNHANDLED otherwise
Since: 2.50
Definition at line 197 of file gmessages.h.