From 83e23b50f87f104846e4ebf4095695563fbb202a Mon Sep 17 00:00:00 2001 From: omltcat <6239696+omltcat@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:43:48 -0400 Subject: [PATCH] Add log.debug, log.info, log.warning, log.error and log.alert functions --- library/mission/log.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/library/mission/log.lua b/library/mission/log.lua index 42bb15d..d8cb083 100644 --- a/library/mission/log.lua +++ b/library/mission/log.lua @@ -53,6 +53,28 @@ log = {} function log.write(subsystem_name, log_level, message, ...) end +---Output log.DEBUG message from the current environment.
+---Note: With the default log level settings, debug messages are not written to the dcs.log file. +---@param message string +function log.debug(message) end + +---Output log.INFO message from the current environment to the dcs.log file. +---@param message string +function log.info(message) end + +---Output log.WARNING message from the current environment to the dcs.log file. +---@param message string +function log.warning(message) end + +---Output log.ERROR message from the current environment to the dcs.log file. +---@param message string +function log.error(message) end + +---Output log.ALERT message from the current environment to the dcs.log file. +---@param message string +function log.alert(message) end + + ---Sends the message to the logger. If there are any arguments after message, the actual string is formed as string.format(message, ...) ---___ ---So, in order to save net.trace(msg) messages to a file, you should issue a call: