EvEmu
0.8.4
11 September 2021
|
#include "eve-core.h"
#include "log/logsys.h"
#include "utils/utils_hex.h"
#include "threading/Mutex.h"
#include "log/logtypes.h"
#include "utils/Lock.h"
Go to the source code of this file.
Macros | |
#define | LOG_CATEGORY(category) #category , |
#define | LOG_TYPE(category, type, enabled, str) { enabled, LOG_ ##category, #category "__" #type, str }, |
Functions | |
FILE * | logsys_log_file (nullptr) |
void | log_hex (LogType type, const void *data, unsigned long length, unsigned char padding) |
void | log_phex (LogType type, const void *data, unsigned long length, unsigned char padding) |
void | log_message (LogType type, const char *fmt,...) |
void | log_messageVA (LogType type, const char *fmt, va_list args) |
void | log_messageVA (LogType type, uint32 iden, const char *fmt, va_list args) |
void | log_enable (LogType t) |
void | log_disable (LogType t) |
void | log_toggle (LogType t) |
bool | log_open_logfile (const char *filename) |
bool | log_close_logfile () |
bool | load_log_settings (const char *filename) |
Variables | |
Mutex | mLogSys |
const char * | log_category_names [NUMBER_OF_LOG_CATEGORIES] |
static LogTypeStatus | real_log_type_info [NUMBER_OF_LOG_TYPES+1] |
const LogTypeStatus * | log_type_info = real_log_type_info |
#define LOG_CATEGORY | ( | category | ) | #category , |
Definition at line 36 of file logsys.cpp.
#define LOG_TYPE | ( | category, | |
type, | |||
enabled, | |||
str | |||
) | { enabled, LOG_ ##category, #category "__" #type, str }, |
Definition at line 42 of file logsys.cpp.
bool load_log_settings | ( | const char * | filename | ) |
Definition at line 168 of file logsys.cpp.
References log_category_names, log_disable(), log_enable(), NUMBER_OF_LOG_CATEGORIES, NUMBER_OF_LOG_TYPES, and strcasecmp.
Referenced by main(), and ConsoleCommand::Process().
bool log_close_logfile | ( | ) |
Definition at line 160 of file logsys.cpp.
References logsys_log_file().
Referenced by CleanUp(), log_open_logfile(), and main().
void log_disable | ( | LogType | t | ) |
Definition at line 139 of file logsys.cpp.
References LogTypeStatus::enabled.
Referenced by load_log_settings().
void log_enable | ( | LogType | t | ) |
Definition at line 134 of file logsys.cpp.
References LogTypeStatus::enabled.
Referenced by load_log_settings().
void log_hex | ( | LogType | type, |
const void * | data, | ||
unsigned long | length, | ||
unsigned char | padding | ||
) |
Definition at line 51 of file logsys.cpp.
References build_hex_line(), and log_message().
Referenced by log_phex().
void log_message | ( | LogType | type, |
const char * | fmt, | ||
... | |||
) |
Definition at line 72 of file logsys.cpp.
References args, and log_messageVA().
Referenced by log_hex(), and log_phex().
void log_messageVA | ( | LogType | type, |
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 79 of file logsys.cpp.
References log_messageVA().
Referenced by PyLogDumpVisitor::_print(), log_message(), and log_messageVA().
Definition at line 84 of file logsys.cpp.
References LogTypeStatus::display_name, localtime_r(), logsys_log_file(), snprintf, Lock< T >::Unlock(), and vsnprintf.
bool log_open_logfile | ( | const char * | filename | ) |
Definition at line 149 of file logsys.cpp.
References log_close_logfile(), and logsys_log_file().
Referenced by main().
void log_phex | ( | LogType | type, |
const void * | data, | ||
unsigned long | length, | ||
unsigned char | padding | ||
) |
Definition at line 60 of file logsys.cpp.
References build_hex_line(), log_hex(), and log_message().
void log_toggle | ( | LogType | t | ) |
Definition at line 144 of file logsys.cpp.
References LogTypeStatus::enabled.
FILE* logsys_log_file | ( | nullptr | ) |
Referenced by log_close_logfile(), log_messageVA(), and log_open_logfile().
const char* log_category_names[NUMBER_OF_LOG_CATEGORIES] |
const LogTypeStatus* log_type_info = real_log_type_info |
Definition at line 49 of file logsys.cpp.
Mutex mLogSys |
Definition at line 32 of file logsys.cpp.
|
static |
Definition at line 43 of file logsys.cpp.