Closed rdswift closed 1 year ago
Nice!!!!
I wonder if it would make sense to write all the output lines with a fixed, common prefix to easily identify the log lines created by this plugin?
I actually had this originally set up to preface each line with "Script Logger:", but when added to the plugin path that Picard includes automatically, it became a bit lengthy (and I couldn't come up with a way to prevent Picard from including the full path to the plugin). It would actually be nice to preface the text with the script name and line number (perhaps as options), but I couldn't find a way to retrieve the name of the currently running script.
Any suggestions on how to overcome these?
This plugin provides a new script function
$logline()
to write entries to Picard's system log. By default, the log level is set atInfo
, but any level can be used by providing the level as an optional second parameter to the function.The function is used as:
$logline(text[,level])
where
text
is the text to write to the log. The entry will be written at log levelInfo
by default, but this can be changed by specifying a different level as an optional second parameter. Allowable log levels are:If an unknown level is entered, the function will use the default
Info
level.