-
Notifications
You must be signed in to change notification settings - Fork 111
dtutils.log
darktable lua logging library
local log = require "lib/dtutils.log"
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.
log - library - the darktable lua logging functions
get the name and line number of the calling routine
get and set the output engine
get or set the log level
print a log message
local log = require "lib/dtutils.log"
local cur_level = log.log_level()
log.log_level(log.warn)
print out warning, error and success messages as code is running
log.log_level(debug)
print out debugging messages too because this isnt working
log.log_level(info)
I want to make sure this is working ok
log.log_level(cur_level)
reset the logging level back to normal
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Copyright (C) 2016 Bill Ferguson [email protected].