Skip to content

Releases: maddinat0r/samp-log-core

v0.5.2

03 Dec 15:31
Compare
Choose a tag to compare

fixed a linkage issue on Linux, where the C++ runtime wasn't linked statically

v0.5.1

06 Oct 12:36
Compare
Choose a tag to compare
  • library is now build with the runtime linked statically
  • fixed some warnings
  • fixed CI setup

v0.5

06 May 14:54
Compare
Choose a tag to compare

BREAKING CHANGES

  • new, future-proof API
  • settings in server.cfg moved to new log-core.yml settings file:
    • logcore_debuginfo 0 (disabling debug info) is now DisableDebugInfo: true (global setting)
    • logtimeformat (setting for log time format, also used by SAMP directly) is now LogTimeFormat (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

12 Jul 08:06
Compare
Choose a tag to compare

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 of SIGTERM on Linux
  • update fmt library
  • general improvements

v0.3

04 Dec 15:49
Compare
Choose a tag to compare

This release breaks compatibility to all older versions!
Code-breaking changes:

  • merged functions samplog_GetLastAmxLine, samplog_GetLastAmxFile and samplog_GetLastAmxFunction to samplog_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 of AmxFuncCallInfo 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 to logcore_debuginfo

v0.2.2

02 Sep 10:24
Compare
Choose a tag to compare

Minor improvements.

v0.2.1

06 Aug 11:09
Compare
Choose a tag to compare

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

v0.2

05 Aug 18:25
Compare
Choose a tag to compare
  • 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)