mirror of
https://github.com/omltcat/dcs-lua-definitions.git
synced 2025-11-10 15:48:52 +00:00
Annotated the log class as 'exact'.
This commit is contained in:
parent
83e23b50f8
commit
f40e196f08
@ -1,11 +1,12 @@
|
|||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
|
|
||||||
---Logging works as follows:
|
---Logging works as follows:
|
||||||
--- - Each log message is accompanied with 2 attributes: a subsystem, and level.
|
--- - Each log message is accompanied with 2 attributes: a subsystem, and level.
|
||||||
--- - After each message gets into the logger it passes (asynchronously) through a series of output filters which decide where the message will be written to.
|
--- - After each message gets into the logger it passes (asynchronously) through a series of output filters which decide where the message will be written to.
|
||||||
---___
|
---___
|
||||||
---log.* API is also available from the Saved Games\DCS\Config\autoexec.cfg file so you can control log output in you local machine.
|
---log.* API is also available from the Saved Games\DCS\Config\autoexec.cfg file so you can control log output in you local machine.
|
||||||
---@class log
|
---@class (exact) log
|
||||||
---@field ALERT 2 Alert level logging.
|
---@field ALERT 2 Alert level logging.
|
||||||
---@field ERROR 8 Error level logging.
|
---@field ERROR 8 Error level logging.
|
||||||
---@field WARNING 16 Warning level logging.
|
---@field WARNING 16 Warning level logging.
|
||||||
@ -50,28 +51,33 @@ log = {}
|
|||||||
---@param log_level logLevel [logLevel](lua://logLevel) to log message to.
|
---@param log_level logLevel [logLevel](lua://logLevel) to log message to.
|
||||||
---@param message string If there are any arguments after message, the actual string is formed as string.format(message, ...)
|
---@param message string If there are any arguments after message, the actual string is formed as string.format(message, ...)
|
||||||
---@param ... unknown string.format arguments.
|
---@param ... unknown string.format arguments.
|
||||||
|
---@diagnostic disable-next-line:inject-field
|
||||||
function log.write(subsystem_name, log_level, message, ...) end
|
function log.write(subsystem_name, log_level, message, ...) end
|
||||||
|
|
||||||
|
|
||||||
---Output log.DEBUG message from the current environment.<br>
|
---Output log.DEBUG message from the current environment.<br>
|
||||||
---Note: With the default log level settings, debug messages are not written to the dcs.log file.
|
---Note: With the default log level settings, debug messages are not written to the dcs.log file.
|
||||||
---@param message string
|
---@param message string
|
||||||
|
---@diagnostic disable-next-line:inject-field
|
||||||
function log.debug(message) end
|
function log.debug(message) end
|
||||||
|
|
||||||
---Output log.INFO message from the current environment to the dcs.log file.
|
---Output log.INFO message from the current environment to the dcs.log file.
|
||||||
---@param message string
|
---@param message string
|
||||||
|
---@diagnostic disable-next-line:inject-field
|
||||||
function log.info(message) end
|
function log.info(message) end
|
||||||
|
|
||||||
---Output log.WARNING message from the current environment to the dcs.log file.
|
---Output log.WARNING message from the current environment to the dcs.log file.
|
||||||
---@param message string
|
---@param message string
|
||||||
|
---@diagnostic disable-next-line:inject-field
|
||||||
function log.warning(message) end
|
function log.warning(message) end
|
||||||
|
|
||||||
---Output log.ERROR message from the current environment to the dcs.log file.
|
---Output log.ERROR message from the current environment to the dcs.log file.
|
||||||
---@param message string
|
---@param message string
|
||||||
|
---@diagnostic disable-next-line:inject-field
|
||||||
function log.error(message) end
|
function log.error(message) end
|
||||||
|
|
||||||
---Output log.ALERT message from the current environment to the dcs.log file.
|
---Output log.ALERT message from the current environment to the dcs.log file.
|
||||||
---@param message string
|
---@param message string
|
||||||
|
---@diagnostic disable-next-line:inject-field
|
||||||
function log.alert(message) end
|
function log.alert(message) end
|
||||||
|
|
||||||
|
|
||||||
@ -96,5 +102,6 @@ function log.alert(message) end
|
|||||||
---@param rule_subsystem_name string Name of the subsystem whose messages to write or empty string to match all subsystems.
|
---@param rule_subsystem_name string Name of the subsystem whose messages to write or empty string to match all subsystems.
|
||||||
---@param rule_level_mask logLevel|integer [logLevel](lua://logLevel) of logging.
|
---@param rule_level_mask logLevel|integer [logLevel](lua://logLevel) of logging.
|
||||||
---@param ... logOutput|integer Sum of [logOutput](lua://logOutput) flags.
|
---@param ... logOutput|integer Sum of [logOutput](lua://logOutput) flags.
|
||||||
|
---@diagnostic disable-next-line:inject-field
|
||||||
function log.set_output(log_file_name_wo_ext, rule_subsystem_name, rule_level_mask, ...) end
|
function log.set_output(log_file_name_wo_ext, rule_subsystem_name, rule_level_mask, ...) end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user