Releases: maddinat0r/samp-log-core
Releases · maddinat0r/samp-log-core
v0.5.2
v0.5.1
- library is now build with the runtime linked statically
- fixed some warnings
- fixed CI setup
v0.5
BREAKING CHANGES
- new, future-proof API
- settings in
server.cfg
moved to newlog-core.yml
settings file:logcore_debuginfo 0
(disabling debug info) is nowDisableDebugInfo: true
(global setting)logtimeformat
(setting for log time format, also used by SAMP directly) is nowLogTimeFormat
(global setting)
Logger configuration now takes place in a central file named log-config.yml
, located in the server root directory (alongside the server binary). The structure and features available to be configured can be taken from following example:
Logger:
plugins/mysql: # logger name
LogLevel: All
LogRotation:
Type: Size
Trigger: 10KB # supported units: KB (kilobyte), MB (megabyte), GB (gigabyte) (defaults to 100MB)
BackupCount: 15 # max backup count to keep (defaults to 10)
# LogRotation:
# Type: Date
# Trigger: Daily # supported times: Daily, Weekly, Monthly (defaults to Daily)
# BackupCount: 25
Append: false # whether to append to log file or overwrite log file on each startup (defaults to true)
PrintToConsole: true # prints log messages into the server console (defaults to false)
system/player/item:
LogLevel:
- Warning
- Error
- Fatal
LogRotation:
Type: Size
Trigger: 20MB
LogLevel: # per loglevel settings
Error:
PrintToConsole: true # prints all errors into the server console (defaults to false)
EnableColors: true # enables colors for server console output (defaults to false)
LogTimeFormat: '%y/%m/%d %H:%M:%S' # refer to https://en.cppreference.com/w/cpp/chrono/c/strftime for a list of all available specifiers (defaults to "%x %X")
#LogsRootFolder: 'custom-logs' (defaults to "logs")
#DisableDebugInfo: true (defaults to "false")
v0.4
This release breaks compatibility to all older versions!
Code-breaking change:
- function
samplog_LogNativeCall
now requires a pointer to the native function's parameter array (this has been taken from the AMX structure directly before)
Other changes:
- catch
SIGINT
instead ofSIGTERM
on Linux - update fmt library
- general improvements
v0.3
This release breaks compatibility to all older versions!
Code-breaking changes:
- merged functions
samplog_GetLastAmxLine
,samplog_GetLastAmxFile
andsamplog_GetLastAmxFunction
tosamplog_GetLastAmxFunctionCall
; this new function now takes a struct which contains all three call information available:
typedef struct
{
int line;
const char *file;
const char *function;
} samplog_AmxFuncCallInfo;
bool samplog_GetLastAmxFunctionCall(
AMX * const amx, samplog_AmxFuncCallInfo *destination);
- changed signature of function
samplog_LogMessage
; it now takes an array ofAmxFuncCallInfo
structs, which represent a call trace of the executing native function
New feature: you can now retrieve a full call info trace of the currently executed native through samplog_GetAmxFunctionCallTrace
Other changes:
- renamed server configuration variable
logplugin_debuginfo
tologcore_debuginfo
v0.2.2
Minor improvements.
v0.2.1
bug-fix: undefined behavior when reading empty server config file line
v0.2
- new server configuration variable
logplugin_debuginfo
: if set to0
, all AMX debug functionality will be disabled (all debug retrieval functions will returnfalse
), even if the AMX file is compiled with debug symbols - complete interface redesign:
- compatibility with C
- noticeable performance improvements
- new init/exit functions
samplog_Init
andsamplog_Exit
: these have to be called inLoad()
andUnload()
respectively
- major crash handling improvements:
- guaranteed crash-safety
- compatibility with other crash handlers (like the crashdetect plugin)
NOTE: load the crashdetect plugin before any other plugin which uses the log-core to ensure compatibility - log-core now detects the console close event on Windows (when you press the red X in the upper right corner of the console window)
- in case of a crash log-core now creates a
log-core.log
file and logs that crash, e.g.:
[31/07/2016 13:44:23] [ERROR] exception 0XC0000005 (ACCESS_VIOLATION) from Unhandled Exception Handler catched; shutting log-core down
(crash on Windows due to a bug in another plugin)
- bug-fix: carriage return isn't stripped from read server.cfg file (thanks to @ziggi for his PR)