Releases: maddinat0r/samp-log
Releases · maddinat0r/samp-log
v0.5
Breaking changes
- parameter
levelin functionCreateLoghas been removed, as log levels are now handled by the log-core YAML config file - function
SetLogPluginLogLevelhas been removed, specify theplugins/log-pluginlogger settings in thelog-config.ymlconfig instead - function
SetLogLevelhas been removed, specify the related logger setting in thelog-config.ymlconfig instead
New features:
- log-core has been updated to v0.5, refer to the log-core release page for all features and changes
- added support for redirecting console output to a logger; add
logplugin_capture_serverlog 1to yourserver.cfgto enable this feature (refer to this on why you'd want to enable this feature) - added more format specifiers to
Log:
| specifier | description |
|---|---|
| s | string |
| d/i | decimal number |
| o | octal number |
| x | hex number (lowercase) |
| X | hex number (uppercase) |
| b | binary number |
| f | float |
| F | float with uppercase "NAN" and "INF" |
| e | float (exponential notation) |
| E | float (exponential notation with uppercase "E") |
| g | float (general format; combination of "f" and "e") |
| G | float (general format, uppercase) |
- general improvements
v0.4
This release breaks compatibility to all older versions! This means you can't use this version with the MySQL plugin version R41-2 or lower!
log-plugin
- added log-plugin plugin log (lol): this plugin now logs its own errors, warnings and debug messages; you can set the log level through
native SetLogPluginLogLevel(E_LOGLEVEL:level);(it's set to error and warning by default) - general improvements
log-core
- catch
SIGINTinstead ofSIGTERMon Linux - general improvements
v0.3
log-core
This release breaks compatibility to all older versions! This means you can't use this version with the MySQL plugin version R41 or lower!
Breaking changes: renamed server configuration variable logplugin_debuginfo to logcore_debuginfo
New feature: log lines now print a full call trace
v0.2.1
log-core: bug-fix: undefined behavior when reading empty server config file line
v0.2
log-core:
- 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_Initandsamplog_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.logfile 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)
log-plugin:
- ensure compatibility between upcoming MySQL plugin release
- added new parameter
debuginfotoCreateLog, which controls printing debug info on a per-log basis - code-breaking change:
SetLogLevelhas noenableparameter anymore, specify the whole log level like that:SetLogLevel(logger, ERROR | WARNING | INFO);
v0.1: initial release
Current natives:
native Logger:CreateLog(const name[], E_LOGLEVEL:level = INFO | WARNING | ERROR):
creates a logger with the specified name and sets the log levelnative DestroyLog(Logger:logger):
destroys the specified loggernative SetLogLevel(Logger:logger, E_LOGLEVEL:level, bool:enabled):
enables/disables the specified log level (only one log level)native bool:IsLogLevel(Logger:logger, E_LOGLEVEL:level):
returnstrueif the specified log level is enabled,falseif not or if error occurednative Log(Logger:logger, E_LOGLEVEL:level, const msg[], {Float,_}:...):
logs the specified message with the specified logger
Note:- valid format specifiers are
%%for an actual%character,%i/%dfor numbers,%ffor floats and%sfor strings - width and spacing is not supported
- valid format specifiers are