MECO™ API Reference
|
Public Member Functions | |
def | __init__ (self, logFile=None) |
Constructor. More... | |
def | file (self) |
Property. More... | |
def | hasFailure (self) |
Property. More... | |
def | setFile (self, logFile, discardExisting=True) |
Set log file. More... | |
def | addInfo (self, message) |
Add info. More... | |
def | addSuccess (self, message) |
Add success. More... | |
def | addWarning (self, message) |
Add warning. More... | |
def | addFailure (self, message) |
Add failure. More... | |
def | getLastFailure (self) |
Get last failure. More... | |
def | displayLastFailure (self) |
Display last failure. More... | |
def | write (self, append=False) |
Write the log into log file. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from mMeco.core.displayLib.Display | |
def | displayInfo (text, startNewLine=True, endNewLine=True, useColor=True) |
Display given text in info format. More... | |
def | displaySuccess (text, startNewLine=True, endNewLine=True, useColor=True) |
Display given text in success format. More... | |
def | displayWarning (text, startNewLine=True, endNewLine=True, useColor=True) |
Display given text in warning format. More... | |
def | displayFailure (text, startNewLine=True, endNewLine=True, useColor=True, stdErr=False) |
Display given text in failure format. More... | |
def | displayHeaderLine (text, startNewLine=True, endNewLine=True, useColor=True) |
Display header line. More... | |
def | displayHeaderText (text, startNewLine=False, endNewLine=False, useColor=True) |
Display header text. More... | |
def | display (text, startNewLine=True, endNewLine=True, useColor=True, color=None, out=sys.stdout) |
Display given text by using file like object. More... | |
def | displayStdOut (text, startNewLine=True, endNewLine=True) |
Display given text by using stdout. More... | |
def | displayStdErr (text, startNewLine=True, endNewLine=True) |
Display given text by using stderr. More... | |
def | displayBlankLine (count=1, out=sys.stdout) |
Display blank lines by giving counts. More... | |
def | getDisplayColor (color) |
Get display color string for given color based on current platform. More... | |
[ CLASS ] - Logger.
def mMeco.core.loggerLib.Logger.__init__ | ( | self, | |
logFile = None |
|||
) |
Constructor.
logFile | [ str | None | in ] - Absolute path of a log file. |
N/A |
def mMeco.core.loggerLib.Logger.file | ( | self | ) |
Property.
N/A |
def mMeco.core.loggerLib.Logger.hasFailure | ( | self | ) |
Property.
N/A |
def mMeco.core.loggerLib.Logger.setFile | ( | self, | |
logFile, | |||
discardExisting = True |
|||
) |
Set log file.
logFile | [ str | None | in ] - Absolute path of a log file. |
discardExisting | [ bool | None | in ] - Discard existing log file, therefore do not append and create a new log file. |
N/A |
def mMeco.core.loggerLib.Logger.addInfo | ( | self, | |
message | |||
) |
Add info.
message | [ str | None | in ] - Message. |
N/A |
def mMeco.core.loggerLib.Logger.addSuccess | ( | self, | |
message | |||
) |
Add success.
message | [ str | None | in ] - Message. |
N/A |
def mMeco.core.loggerLib.Logger.addWarning | ( | self, | |
message | |||
) |
Add warning.
message | [ str | None | in ] - Message. |
N/A |
def mMeco.core.loggerLib.Logger.addFailure | ( | self, | |
message | |||
) |
Add failure.
message | [ str | None | in ] - Message. |
N/A |
def mMeco.core.loggerLib.Logger.getLastFailure | ( | self | ) |
Get last failure.
N/A |
def mMeco.core.loggerLib.Logger.displayLastFailure | ( | self | ) |
Display last failure.
N/A |
def mMeco.core.loggerLib.Logger.write | ( | self, | |
append = False |
|||
) |
Write the log into log file.
append | [ bool | False | in ] - Append to log file. |
N/A |