Skip to content

Releases: maddinat0r/samp-log

v0.5

12 Aug 10:00
Compare
Choose a tag to compare

Breaking changes

  • parameter level in function CreateLog has been removed, as log levels are now handled by the log-core YAML config file
  • function SetLogPluginLogLevel has been removed, specify the plugins/log-plugin logger settings in the log-config.yml config instead
  • function SetLogLevel has been removed, specify the related logger setting in the log-config.yml config 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 1 to your server.cfg to 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

12 Jul 10:58
Compare
Choose a tag to compare

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 SIGINT instead of SIGTERM on Linux
  • general improvements

v0.3

04 Dec 16:02
Compare
Choose a tag to compare

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

06 Aug 11:10
Compare
Choose a tag to compare

log-core: bug-fix: undefined behavior when reading empty server config file line

v0.2

05 Aug 18:35
Compare
Choose a tag to compare

log-core:

  • new server configuration variable logplugin_debuginfo: if set to 0, all AMX debug functionality will be disabled (all debug retrieval functions will return false), 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 and samplog_Exit: these have to be called in Load() and Unload() 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)

log-plugin:

  • ensure compatibility between upcoming MySQL plugin release
  • added new parameter debuginfo to CreateLog, which controls printing debug info on a per-log basis
  • code-breaking change: SetLogLevel has no enable parameter anymore, specify the whole log level like that: SetLogLevel(logger, ERROR | WARNING | INFO);

v0.1: initial release

19 Mar 18:10
Compare
Choose a tag to compare

Current natives:

  • native Logger:CreateLog(const name[], E_LOGLEVEL:level = INFO | WARNING | ERROR):
    creates a logger with the specified name and sets the log level
  • native DestroyLog(Logger:logger):
    destroys the specified logger
  • native 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):
    returns true if the specified log level is enabled, false if not or if error occured
  • native 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/%d for numbers, %f for floats and %s for strings
    • width and spacing is not supported