🔗USAGE local log = require "lib/dtutils.log" 🔗DESCRIPTION log provides a multi-level logging solution for use with the darktable lua scripts. With this library you can leave log messages scattered through out your code and only turn them on as necessary.
🔗RETURN VALUE log - library - the darktable lua logging functions
🔗FUNCTIONS 🔗caller get the name and line number of the calling routine</description>
🔗SYNOPSIS get the name and line number of the calling routine
🔗USAGE local log = require &quot;lib/dtutils.log&quot; result = log.caller(level) level - number - the number of stack levels to go down to retrieve the caller routine information
🔗DESCRIPTION caller gets the name and line number of the calling routine and returns it
🔗RETURN VALUE result - string - the name and line number of the calling function or &lsquo;callback: ' if the attempt to get the caller returns nil</description>
🔗USAGE local log = require &quot;lib/dtutils.log&quot; result = log.engine(level, ...) level - table - the log level to get or set the engine for, one of log.debug, log.info, log.warn, log.error log.success, log.always, log.screen, log.critical
&hellip; - function - the output function, one of dt.print, dt.print_error, dt.print_log, print if not function is included, the current engine is returned for the specified log level</description>
🔗USAGE local log = require &quot;lib/log&quot; local result = log.log_level(...) &hellip; - arguments - if none is supplied, then the current log level is returned as one of: log.debug, log.info, log.warn, log.error, log.success. If one of log.debug, log.info, log.warn, log.error, or log.success is supplied as the argument then the log level is set to that value. All log levels greater than or equal in value will be enabled.</description>
🔗USAGE local log = require &quot;lib/log&quot; log.msg(level, ...) level - table - the type of message, one of:
log.debug - debugging messages log.info - informational messages log.warn - warning messages log.error - error messages log.success - success messages log.always - an internal message for debugging log.screen - output 1 line of text to the screen log.critical - print a critical message to the console &hellip; - string(s) - the message to print, which could be a comma separated set of strings</description>