12.02.2019, 16:00
(07.02.2019, 08:02)admin Wrote: Add this to common functions:
Code:1234567local current_log_level = 0 -- adjust as needed function log_level(level, ...) if current_log_level >= level then log(...) end end
Then specify log level as first argument to log_level() function and use it the same as standard log(). The only limitation is that this approach will not work for resident scripts as common functions library is loaded only once when script starts.
Thanks admin