Transcript Logging
Transcript Logging provides the ability to write all text sent to the Transcript simultaneously to a file. The control of the logging is available from the File->Logging submenu on the Transcript window, or can be scripted using the public interface.
In addition to simultaneously logging to the Transcript window and a file, Transcript Logging also provides the ability to disable displaying text in the Transcript. If logging is enabled, all text that is sent to the Transcript will be redirected to the active log file. If both Transcript and file logging are disabled, all output is suppressed.
Transcript Logging menu
• Write to Transcript window
o When enabled (checked), text sent to the Transcript is written in the Transcript window.
o The default is enabled.
• Write to Log file
o When enabled, text sent to the Transcript is written to the active log file.
o The default log file is Transcript.log located in the current working directory.
o The default is disabled.
• Set default log file name
o Opens a file explorer allowing the selection/creation of a file to be used for saving text sent to the Transcript.
• Reset default log file name
o Clears the default log file name
Transcript Logging scriptable interface
The public interface to Transcript Logging is defined in the Logging category of the EtTranscript class.
The following instance methods are available
disableLogging
If a log file is active, it is closed and then the active log file is cleared.
enableLogging
Open the default log file and make it the active.
enableLoggingOnFileNamed: aFilePathAndName
Bypasses the default log file and sets the active log file to the file specified by aFilePathAndName
isLoggingToFile
Query whether or not there is an active log file.
logFilePathAndName
If there is an active log file, its name is returned; otherwise an empty string.
writeToTranscriptWindow
Query whether or not writing to the Transcript window is enabled.
writeToTranscriptWindow: aBoolean
Enable/disable writing the Transcript window.
The following class methods are available
defaultLogFileName
Returns the file path and name of the log file that should be used.
defaultLogFileName: aFilePathAndNameOrNil
Set the file path and name of the default log file. Setting it to nil will result in the system default of ‘Transcript.log’.
resetDefaultTranscriptLogFile
Set the default log file name to nil.
Last modified date: 04/28/2022