uiautomation
uiautomation.uiautomation.Logger クラス

静的公開メンバ関数

None SetLogFile (str path)
 
None Write (Any log, int consoleColor=ConsoleColor.Default, bool writeToFile=True, bool printToStdout=True, str logFile=None, int printTruncateLen=0)
 
None WriteLine (Any log, int consoleColor=-1, bool writeToFile=True, bool printToStdout=True, str logFile=None)
 
None ColorfullyWrite (str log, int consoleColor=-1, bool writeToFile=True, bool printToStdout=True, str logFile=None)
 
None ColorfullyWriteLine (str log, int consoleColor=-1, bool writeToFile=True, bool printToStdout=True, str logFile=None)
 
None Log (Any log='', int consoleColor=-1, bool writeToFile=True, bool printToStdout=True, str logFile=None)
 
None ColorfullyLog (str log='', int consoleColor=-1, bool writeToFile=True, bool printToStdout=True, str logFile=None)
 
None DeleteLog ()
 

静的公開変数類

string FileName = '@AutomationLog.txt'
 
dictionary ColorNames
 

詳解

Logger for print and log. Support for printing log with different colors on console.

メソッド詳解

◆ ColorfullyLog()

None uiautomation.uiautomation.Logger.ColorfullyLog ( str   log = '',
int   consoleColor = -1,
bool   writeToFile = True,
bool   printToStdout = True,
str   logFile = None 
)
static
log: any type.
consoleColor: int, a value in class ConsoleColor, such as ConsoleColor.DarkGreen.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.

ColorfullyLog('Hello <Color=Green>Green</Color> !!!'), color name must be in Logger.ColorNames

◆ ColorfullyWrite()

None uiautomation.uiautomation.Logger.ColorfullyWrite ( str  log,
int   consoleColor = -1,
bool   writeToFile = True,
bool   printToStdout = True,
str   logFile = None 
)
static
log: str.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.
ColorfullyWrite('Hello <Color=Green>Green</Color> !!!'), color name must be in Logger.ColorNames.

◆ ColorfullyWriteLine()

None uiautomation.uiautomation.Logger.ColorfullyWriteLine ( str  log,
int   consoleColor = -1,
bool   writeToFile = True,
bool   printToStdout = True,
str   logFile = None 
)
static
log: str.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.

ColorfullyWriteLine('Hello <Color=Green>Green</Color> !!!'), color name must be in Logger.ColorNames.

◆ DeleteLog()

None uiautomation.uiautomation.Logger.DeleteLog ( )
static
Delete log file.

◆ Log()

None uiautomation.uiautomation.Logger.Log ( Any   log = '',
int   consoleColor = -1,
bool   writeToFile = True,
bool   printToStdout = True,
str   logFile = None 
)
static
log: any type.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.

◆ SetLogFile()

None uiautomation.uiautomation.Logger.SetLogFile ( str  path)
static

◆ Write()

None uiautomation.uiautomation.Logger.Write ( Any  log,
int   consoleColor = ConsoleColor.Default,
bool   writeToFile = True,
bool   printToStdout = True,
str   logFile = None,
int   printTruncateLen = 0 
)
static
log: any type.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.
printTruncateLen: int, if <= 0, log is not truncated when print.

◆ WriteLine()

None uiautomation.uiautomation.Logger.WriteLine ( Any  log,
int   consoleColor = -1,
bool   writeToFile = True,
bool   printToStdout = True,
str   logFile = None 
)
static
log: any type.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.

メンバ詳解

◆ ColorNames

dictionary uiautomation.uiautomation.Logger.ColorNames
static
初期値:
= {
"Black": ConsoleColor.Black,
"DarkBlue": ConsoleColor.DarkBlue,
"DarkGreen": ConsoleColor.DarkGreen,
"DarkCyan": ConsoleColor.DarkCyan,
"DarkRed": ConsoleColor.DarkRed,
"DarkMagenta": ConsoleColor.DarkMagenta,
"DarkYellow": ConsoleColor.DarkYellow,
"Gray": ConsoleColor.Gray,
"DarkGray": ConsoleColor.DarkGray,
"Blue": ConsoleColor.Blue,
"Green": ConsoleColor.Green,
"Cyan": ConsoleColor.Cyan,
"Red": ConsoleColor.Red,
"Magenta": ConsoleColor.Magenta,
"Yellow": ConsoleColor.Yellow,
"White": ConsoleColor.White,
}

◆ FileName

string uiautomation.uiautomation.Logger.FileName = '@AutomationLog.txt'
static

このクラス詳解は次のファイルから抽出されました: