include/log.h File Reference

#include <stdarg.h>
#include <stdbool.h>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LOG(fmt,...)   verboselog(fmt, ##__VA_ARGS__)
 #__VA_ARGS__ means: leave out __VA_ARGS__ completely if it is empty, that is, delete the preceding comma
#define ELOG(fmt,...)   errorlog("ERROR: " fmt, ##__VA_ARGS__)
#define DLOG(fmt,...)   debuglog(LOGLEVEL, "%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)

Functions

void add_loglevel (const char *level)
 Enables the given loglevel.
void set_verbosity (bool _verbose)
 Set verbosity of i3.
void debuglog (int lev, char *fmt,...)
 Logs the given message to stdout while prefixing the current time to it, but only if the corresponding debug loglevel was activated.
void errorlog (char *fmt,...)
 Logs the given message to stdout while prefixing the current time to it.
void verboselog (char *fmt,...)
 Logs the given message to stdout while prefixing the current time to it, but only if verbose mode is activated.
void slog (char *fmt, va_list args)
 Logs the given message to stdout while prefixing the current time to it.

Variables

char * loglevels []

Define Documentation

#define DLOG ( fmt,
...   )     debuglog(LOGLEVEL, "%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)

Definition at line 21 of file log.h.

Referenced by add_subscription(), append_argument(), button_press_bar(), button_press_stackwin(), cached_pixmap_prepare(), check_crossing_screen_boundary(), cleanup_table(), client_enter_fullscreen(), client_remove_from_container(), client_set_below_floating(), container_mode(), disable_randr(), drag_pointer(), DRAGGING_CB(), dump_table(), ewmh_update_workarea(), expand_table_cols_at_head(), expand_table_rows_at_head(), fix_colrowspan(), floating_border_click(), floating_drag_window(), floating_focus_direction(), floating_mod_on_tiled_client(), floating_move(), floating_resize_window(), floating_toggle_hide(), focus_thing(), format_event(), get_first_workspace_for_output(), get_matching_client(), get_output_containing(), get_unoccupied_x(), get_unoccupied_y(), grab_keycode_for_binding(), handle_button_press(), handle_clientleader_change(), handle_configure_request(), handle_destroy_notify_event(), handle_enter_notify(), handle_expose_event(), handle_hints(), handle_key_press(), handle_map_request(), handle_mapping_notify(), handle_normal_hints(), handle_output(), handle_screen_change(), handle_signal(), handle_transient_for(), handle_unmap_notify_event(), handle_windowclass_change(), handle_windowname_change(), handle_windowname_change_legacy(), initialize_output(), initialize_xinerama(), ipc_create_socket(), ipc_new_client(), ipc_receive_message(), ipc_send_message(), jump_to_container(), main(), move_columns_from(), move_current_container(), move_current_window_in_container(), move_current_window_to_workspace(), move_floating_window_to_workspace(), move_rows_from(), output_change_mode(), parse_command(), parse_configuration(), parse_file(), parse_resize_command(), query_screens(), randr_query_outputs(), render_bars(), render_container(), render_workspace(), reparent_window(), reposition_client(), resize_client(), resize_container(), resize_graphical_handler(), restore_geometry(), set_focus(), shrink_table_cols(), shrink_table_rows(), sig_handle_key_press(), snap_current_container(), switch_layout_mode(), toggle_floating_mode(), translate_keysyms(), travel_focus_stack(), ungrab_all_keys(), workspace_assign_to(), workspace_get(), workspace_initialize(), workspace_show(), workspace_unmap_clients(), xkb_got_event(), and yyparse().

#define ELOG ( fmt,
...   )     errorlog("ERROR: " fmt, ##__VA_ARGS__)
#define LOG ( fmt,
...   )     verboselog(fmt, ##__VA_ARGS__)

Function Documentation

void add_loglevel ( const char *  level  ) 

Enables the given loglevel.

Definition at line 41 of file log.c.

References loglevel, loglevels, and UINT32_MAX.

Referenced by main().

void debuglog ( int  lev,
char *  fmt,
  ... 
)

Logs the given message to stdout while prefixing the current time to it, but only if the corresponding debug loglevel was activated.

Definition at line 112 of file log.c.

References loglevel, and vlog().

Here is the call graph for this function:

void errorlog ( char *  fmt,
  ... 
)

Logs the given message to stdout while prefixing the current time to it.

Definition at line 98 of file log.c.

References vlog().

Here is the call graph for this function:

void set_verbosity ( bool  _verbose  ) 

Set verbosity of i3.

If verbose is set to true, informative messages will be printed to stdout. If verbose is set to false, only errors will be printed.

Definition at line 33 of file log.c.

References verbose.

Referenced by main().

void slog ( char *  fmt,
va_list  args 
)

Logs the given message to stdout while prefixing the current time to it.

This is to be called by LOG() which includes filename/linenumber

void verboselog ( char *  fmt,
  ... 
)

Logs the given message to stdout while prefixing the current time to it, but only if verbose mode is activated.

Definition at line 83 of file log.c.

References verbose, and vlog().

Here is the call graph for this function:


Variable Documentation

char* loglevels[]

Definition at line 1 of file loglevels.h.

Referenced by add_loglevel().


Generated by  doxygen 1.6.2