tmux  3.2a
About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.
  Fossies Dox: tmux-3.2a.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

log.c File Reference
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "tmux.h"
Include dependency graph for log.c:

Go to the source code of this file.

Functions

static void log_event_cb (int, const char *)
 
static void log_vwrite (const char *, va_list)
 
void log_add_level (void)
 
int log_get_level (void)
 
void log_open (const char *name)
 
void log_toggle (const char *name)
 
void log_close (void)
 
void log_debug (const char *msg,...)
 
void fatal (const char *msg,...)
 
void fatalx (const char *msg,...)
 

Variables

static FILE * log_file
 
static int log_level
 

Function Documentation

◆ fatal()

◆ fatalx()

void fatalx ( const char *  msg,
  ... 
)

◆ log_add_level()

void log_add_level ( void  )

Definition at line 44 of file log.c.

References log_level.

Referenced by main().

◆ log_close()

void log_close ( void  )

Definition at line 93 of file log.c.

References log_file.

Referenced by log_open(), log_toggle(), and spawn_pane().

◆ log_debug()

void log_debug ( const char *  msg,
  ... 
)

Definition at line 130 of file log.c.

References log_file, and log_vwrite().

Referenced by alerts_callback(), alerts_queue(), alerts_reset(), check_window_name(), client_connect(), client_dispatch_attached(), client_dispatch_wait(), client_exec(), client_get_lock(), client_main(), client_signal(), clients_calculate_size(), cmd_display_menu_exec(), cmd_display_panes_draw(), cmd_find_best_session(), cmd_find_best_session_with_window(), cmd_find_best_winlink_with_window(), cmd_find_client(), cmd_find_current_client(), cmd_find_get_pane(), cmd_find_get_pane_with_session(), cmd_find_get_pane_with_window(), cmd_find_get_session(), cmd_find_get_window(), cmd_find_get_window_with_session(), cmd_find_inside_pane(), cmd_find_log_state(), cmd_find_target(), cmd_log_argv(), cmd_mouse_at(), cmd_parse_build_commands(), cmd_parse_commands_to_string(), cmd_pipe_pane_error_callback(), cmd_pipe_pane_read_callback(), cmd_pipe_pane_write_callback(), cmd_source_file_add(), cmd_stringify_argv(), cmd_wait_for_add(), cmd_wait_for_exec(), cmdq_append(), cmdq_error(), cmdq_find_flag(), cmdq_insert_after(), cmdq_insert_hook(), cmdq_next(), cmdq_print(), control_check_age(), control_check_subs_timer(), control_error(), control_flush_all_blocks(), control_read_callback(), control_vwrite(), control_write(), control_write_callback(), control_write_data(), control_write_pending(), default_window_size(), environ_log(), expand_paths(), file_push(), file_read_callback(), file_read_data(), file_read_done(), file_read_error_callback(), file_read_open(), file_write_callback(), file_write_close(), file_write_data(), file_write_error_callback(), file_write_left(), file_write_open(), format_defaults(), format_draw(), format_job_complete(), format_job_tidy(), format_job_update(), format_log1(), grid_check_y(), input_c0_dispatch(), input_csi_dispatch(), input_csi_dispatch_rm(), input_csi_dispatch_rm_private(), input_csi_dispatch_sgr_colon(), input_csi_dispatch_sm(), input_csi_dispatch_sm_private(), input_csi_dispatch_winops(), input_dcs_dispatch(), input_end_bel(), input_enter_apc(), input_enter_dcs(), input_enter_osc(), input_enter_rename(), input_esc_dispatch(), input_exit_apc(), input_exit_osc(), input_exit_rename(), input_key(), input_key_build(), input_key_mouse(), input_key_pane(), input_key_write(), input_osc_10(), input_osc_11(), input_osc_4(), input_osc_52(), input_osc_parse_colour(), input_parse_buffer(), input_split(), input_timer_callback(), input_top_bit_set(), job_check_died(), job_error_callback(), job_free(), job_resize(), job_write_callback(), key_bindings_add(), key_bindings_remove(), layout_parse(), layout_print_cell(), load_cfg(), load_cfg_from_buffer(), log_event_cb(), log_toggle(), mode_tree_add(), name_time_callback(), notify_callback(), options_string_to_style(), peer_check_version(), proc_add_peer(), proc_event_cb(), proc_loop(), proc_remove_peer(), proc_send(), proc_start(), recalculate_size(), resize_window(), screen_redraw_draw_borders(), screen_redraw_draw_pane(), screen_redraw_draw_pane_status(), screen_redraw_draw_panes(), screen_redraw_draw_status(), screen_redraw_screen(), screen_redraw_set_context(), screen_reflow(), screen_resize_cursor(), screen_write_cell(), screen_write_collect_add(), screen_write_collect_end(), screen_write_collect_flush(), screen_write_collect_scroll(), screen_write_collect_trim(), screen_write_combine(), screen_write_cursormove(), screen_write_linefeed(), screen_write_overwrite(), screen_write_set_client_cb(), screen_write_start(), screen_write_start_callback(), screen_write_start_pane(), server_add_message(), server_child_exited(), server_client_assume_paste(), server_client_attached_lost(), server_client_check_mouse(), server_client_check_pane_buffer(), server_client_check_pane_resize(), server_client_check_redraw(), server_client_check_window_resize(), server_client_click_timer(), server_client_create(), server_client_dispatch_identify(), server_client_free(), server_client_lost(), server_client_redraw_timer(), server_client_reset_state(), server_client_resize_timer(), server_client_set_flags(), server_client_set_pane(), server_client_unref(), server_signal(), server_tidy_event(), session_add_ref(), session_create(), session_destroy(), session_free(), session_lock_timer(), session_remove_ref(), session_update_activity(), spawn_log(), spawn_pane(), status_prompt_complete(), status_prompt_load_history(), status_prompt_save_history(), status_redraw(), status_timer_callback(), style_parse(), tty_add(), tty_add_features(), tty_apply_features(), tty_block_maybe(), tty_clear_area(), tty_clear_line(), tty_clear_pane_line(), tty_cursor_pane_unless_wrap(), tty_draw_line(), tty_draw_pane(), tty_keys_add(), tty_keys_clipboard(), tty_keys_device_attributes(), tty_keys_extended_device_attributes(), tty_keys_extended_key(), tty_keys_mouse(), tty_keys_next(), tty_keys_next1(), tty_read_callback(), tty_redraw_region(), tty_resize(), tty_start_timer_callback(), tty_start_tty(), tty_sync_end(), tty_sync_start(), tty_term_apply(), tty_term_apply_overrides(), tty_term_create(), tty_term_free(), tty_timer_callback(), tty_update_client_offset(), tty_update_mode(), tty_write_callback(), utf8_from_data(), utf8_to_data(), window_add_pane(), window_add_ref(), window_copy_clone_screen(), window_create(), window_destroy(), window_lost_pane(), window_pane_error_callback(), window_pane_read_callback(), window_pane_reset_mode(), window_pane_resize(), window_pane_search(), window_pane_send_resize(), window_pop_zoom(), window_push_zoom(), window_remove_ref(), window_resize(), window_set_active_pane(), yylex_format(), yylex_get_word(), yylex_token(), yylex_token_tilde(), and yylex_token_variable().

◆ log_event_cb()

static void log_event_cb ( int  severity,
const char *  msg 
)
static

Definition at line 37 of file log.c.

References log_debug().

Referenced by log_open().

◆ log_get_level()

◆ log_open()

void log_open ( const char *  name)

Definition at line 58 of file log.c.

References log_close(), log_event_cb(), log_file, log_level, name, and xasprintf().

Referenced by log_toggle(), and proc_start().

◆ log_toggle()

void log_toggle ( const char *  name)

Definition at line 78 of file log.c.

References log_close(), log_debug(), log_level, log_open(), and name.

Referenced by proc_toggle_log().

◆ log_vwrite()

static void log_vwrite ( const char *  msg,
va_list  ap 
)
static

Definition at line 104 of file log.c.

References log_file, and vasprintf().

Referenced by fatal(), fatalx(), and log_debug().

Variable Documentation

◆ log_file

FILE* log_file
static

Definition at line 29 of file log.c.

Referenced by log_close(), log_debug(), log_open(), and log_vwrite().

◆ log_level

int log_level
static

Definition at line 30 of file log.c.

Referenced by log_add_level(), log_get_level(), log_open(), and log_toggle().