Developer_release_1.4.0

Class mint.bindings.logger_wrapper

Functions for logging.

Usage:

    local mint = require 'mint'
    local cfg = mint:configuration()
    local log = cfg:logger('my_app')
    log:info('Hello world!')
    

Methods

log:critical (...) Add a log message at the "critical level.
log:debug (...) Add a log message at the "debug" level.
log:error (...) Add a log message at the "error" level.
log:info (...) Add a log message at the "info" level.
log:set_level (string) Sets logging level for the logger.
log:trace (...) Add a log message at the "trace" level.
log:warn (...) Add a log message at the "warning" level.


Methods

log:critical (...)
Add a log message at the "critical level.

Parameters:

  • ... any[] Arbitrary arguments which need be logged. Each argument is converted to string and all the arguments are concatenated with space as a separator.

Returns:

    None

Usage:

    log:critical('CRITICAL ERROR')
log:debug (...)
Add a log message at the "debug" level.

Parameters:

  • ... any[] Arbitrary arguments which need be logged. Each argument is converted to string and all the arguments are concatenated with space as a separator.

Returns:

    None

Usage:

    log:debug('debug message')
log:error (...)
Add a log message at the "error" level.

Parameters:

  • ... any[] Arbitrary arguments which need be logged. Each argument is converted to string and all the arguments are concatenated with space as a separator.

Returns:

    None

Usage:

    log:error('RUNTIME ERROR')
log:info (...)
Add a log message at the "info" level.

Parameters:

  • ... any[] Arbitrary arguments which need be logged. Each argument is converted to string and all the arguments are concatenated with space as a separator.

Returns:

    None

Usage:

    log:info('info message')
log:set_level (string)
Sets logging level for the logger.

Parameters:

  • string level Logger level

Returns:

    true (on success)

Or

  1. nil
  2. string Error message (on failure)

Usage:

    local mint = require 'mint'
    local cfg = mint:configuration()
    local log = cfg:logger('mint')
    log:set_level('debug')
log:trace (...)
Add a log message at the "trace" level.

Parameters:

  • ... any[] Arbitrary arguments which need be logged. Each argument is converted to string and all the arguments are concatenated with space as a separator.

Returns:

    None

Usage:

    log:trace('debug message')
log:warn (...)
Add a log message at the "warning" level.

Parameters:

  • ... any[] Arbitrary arguments which need be logged. Each argument is converted to string and all the arguments are concatenated with space as a separator.

Returns:

    None

Usage:

    log:warn('Warning 100')
generated by LDoc 1.4.6 Last updated 1980-01-01 00:00:00