Log¶
-
spirit.log.
LEVEL_ALL
= 0¶ Only log highest-level messages, as well as Severe and Error messages.
-
spirit.log.
LEVEL_DEBUG
= 6¶ Accept log messages of Debug and higher levels.
-
spirit.log.
LEVEL_ERROR
= 2¶ Only log highest-level messages, as well as Severe and Error messages.
-
spirit.log.
LEVEL_INFO
= 5¶ Accept log messages of Info and higher levels.
-
spirit.log.
LEVEL_PARAMETER
= 4¶ Accept log messages of Parameter and higher levels.
-
spirit.log.
LEVEL_SEVERE
= 1¶ Only log highest-level messages, as well as Severe and Error messages.
-
spirit.log.
LEVEL_WARNING
= 3¶ Accept log messages of Warning and higher levels.
-
spirit.log.
SENDER_ALL
= 0¶ General message sender.
-
spirit.log.
SENDER_API
= 6¶ API message sender.
-
spirit.log.
SENDER_GNEB
= 2¶ GNEB method message sender.
-
spirit.log.
SENDER_IO
= 1¶ Everything related to I/O.
-
spirit.log.
SENDER_LLG
= 3¶ LLG method message sender.
-
spirit.log.
SENDER_MC
= 4¶ Monte Carlo method message sender.
-
spirit.log.
SENDER_MMF
= 5¶ MMF method message sender.
-
spirit.log.
SENDER_UI
= 7¶ User interface message sender.
-
spirit.log.
append
(p_state)¶ Force the appending of new messages to the log file.
-
spirit.log.
get_n_entries
(p_state)¶ Returns the number of Log entries.
-
spirit.log.
get_n_errors
(p_state)¶ Returns the number of error messages that have been logged.
-
spirit.log.
get_n_warnings
(p_state)¶ Returns the number of warning messages that have been logged.
-
spirit.log.
get_output_console_level
(p_state)¶ Returns the level up to which the Log is output to the console.
The return value will be one of the integers defined above.
-
spirit.log.
get_output_file_level
(p_state)¶ Returns the level up to which the Log is output to a file.
The return value will be one of the integers defined above.
-
spirit.log.
get_output_to_console
(p_state)¶ Returns a bool indicating whether the Log is output to the console.
-
spirit.log.
get_output_to_file
(p_state)¶ Returns a bool indicating whether the Log is output to a file.
-
spirit.log.
send
(p_state, level, sender, message, idx_image=-1, idx_chain=-1)¶ Add a message to the log.
Arguments:
- level: see integers defined above. The message may be printed to the console and/or written to the log file, depending on the current log parameters
- sender: see integers defined above. Used to distinguish context
- message: a string which to log
Keyword arguments:
- idx_image: can be used to specify to which image the message relates (default: active image)
-
spirit.log.
set_output_file_tag
(p_state, tag)¶ Set the tagging string which is placed in front of the log file.
If “<time>” is used for the tag, it will be the time of creation of the state.
-
spirit.log.
set_output_folder
(p_state, tag)¶ Set the output folder in which to place the log file.
-
spirit.log.
set_output_to_console
(p_state, output, level)¶ Set whether the Log is output to the console and the level up to which messages are logged.
-
spirit.log.
set_output_to_file
(p_state, output, level)¶ Set whether the Log is output to a file and the level up to which messages are logged.