OpenTAP 9.24
API Reference
Static Public Member Functions | List of all members
OpenTap.SessionLogs Class Reference

SessionLogs are logs of all events that occur during startup/shutdown of a OpenTAP session and of all the session's TestPlan runs. A new session log is created at the start of each session, which starts when a process is launched and ends when it closes. Only 10 session logs are allowed to exist, with the oldest deleted as new logs are created. By comparison, a result log typically shows only the log activity for a single run of a TestPlan. More...

Static Public Member Functions

static string GetSessionLogFilePath ()
 File path to the current log file. Path is updated upon UI launch.
 
static void Initialize ()
 Initializes the logging. Uses the following file name formatting: SessionLogs\[Application Name]\[Application Name] [yyyy-MM-dd HH-mm-ss].txt.
 
static void Initialize (string logFileName)
 Initializes the logging.
 
static void Initialize (string logFileName, bool noExclusiveWriteLock)
 Initializes the logging. More...
 
static void Rename (string path)
 Renames a previously initialized temporary log file.
 
static void Flush ()
 Flushes the buffered logs. Useful as the last thing to do in case of crash.
 

Detailed Description

SessionLogs are logs of all events that occur during startup/shutdown of a OpenTAP session and of all the session's TestPlan runs. A new session log is created at the start of each session, which starts when a process is launched and ends when it closes. Only 10 session logs are allowed to exist, with the oldest deleted as new logs are created. By comparison, a result log typically shows only the log activity for a single run of a TestPlan.

Member Function Documentation

◆ Initialize()

static void OpenTap.SessionLogs.Initialize ( string  logFileName,
bool  noExclusiveWriteLock 
)
inlinestatic

Initializes the logging.

Parameters
logFileNameThe name of the log file
noExclusiveWriteLockControls whether or not the file should have an exclusive write lock. If true, the log file may be deleted while it is in use, in which case session logs will be written into the void.

OpenTAP 9.24 API built Tue Apr 30 2024 13:44:42