Journal
Relevant module: edelweissfe.journal.journal
This module provides journaling capabilities, which can be used troughout EdelweissFE.
- class edelweissfe.journal.journal.Journal(verbose=True, outputFile=None, suppressFromLevel=3)[source]
This class provides an interface to present messages to the user via console output and/or file output. Information messages can be sorted by the importance level. Suppressing certain levels of output is possible.
- Parameters
verbose (bool) – Print to the terminal.
outputFile (str) – Write to a file.
suppressFromLevel (int) – Suppress certain levels.
Methods
errorMessage
(errorMessage, senderIdentification)Print an error message.
message
(message, senderIdentification[, level])Write message to log.
Write a seperation file to log.
printTable
(table, senderIdentification[, ...])Print a pretty table.
setNewLineWidth
([newWidth, leftColumn])Set the line width of the log file.
Set highest verbosity.
squelch
(level)Suppress all messages.
printPrettyTable
setFileOutput
- errorMessage(errorMessage, senderIdentification)[source]
Print an error message.
- Parameters
errorMessage (str) – The message.
senderIdentification (str) – The name of the sender.
- message(message, senderIdentification, level=1)[source]
Write message to log.
- Parameters
message (str) – The message.
senderIdentification (str) – The name of the sender.
level (int) – Level of message.
- printTable(table, senderIdentification, level=1, printHeaderRow=True)[source]
Print a pretty table.
- Parameters
table (list[list[str]]) – The table as nested list.
senderIdentification (str) – The name of the sender.
level (int) – The level of the mesage.
printHeaderRow (bool) – Special formatting for first row.