FOM Reference > Application > Datatypes > fLog interface
  
fLog interface
Macro: logwriter
This object represents a location where log, status and error messages can be output.
LogNumber enumeration
Aliases for standard logs used by PTC ALD.
The LogNumber enumeration has the following constants of type int.
LOG_BFOUT = 0
This log is used by PTC ALD for information messages.
LOG_BFERR = 1
This log is used by PTC ALD for error messages.
LOG_BFDBG = 2
This log is used by PTC ALD for debugging statements.
LOG_BFODS = 3
This log is used by PTC ALD for debugging statements.
LOG_BFLOG = 4
This log is used by PTC ALD for log messages.
LOG_JSDBG = 9
This log is used by PTC ALD for JavaScript information messages.
LOG_JSOUT = 10
This log is used by PTC ALD for JavaScript information messages.
LOG_JSINFO = 11
This log is used by PTC ALD for JavaScript information messages.
LOG_JSWARN = 12
This log is used by PTC ALD for JavaScript warnings.
LOG_JSERR = 13
This log is used by PTC ALD for JavaScript error messages.
LOG_BFINFO = 14
This log is used by PTC ALD for formatting information messages.
LOG_BFWARN = 15
This log is used by PTC ALD for formatting warnings.
LOG_BFFATAL = 16
This log is used by PTC ALD for formatting error messages.
LogType enumeration
Possible locations for log outputs.
The LogType enumeration has the following constants of type int.
LOG_FILE = 1
Write log messages to a file.
LOG_STREAM = 2
Write log messages to an PTC ALD stream.
LOG_VARIABLE = 3
Write log messages to an PTC ALD fVariable.
LOG_SYSTEM = 4
Write log messages to an alert dialog.
LOG_ODS = 5
Write log messages to the Windows Debugging System.
LOG_ERROR = 100
Write log messages to the PTC ALD error file.
isOpen attribute
If true, this log is open and available to write to.
isOpen
Access
read-only
Returns
boolean
path attribute
The name or path the log messages get written to. The specific value of this property depends upon on the type of log.
path
Access
read-only
Returns
String
type attribute
The type of log this object represents.
type
Access
read-only
Returns
int
close method
Macro: logclose
Close the log.
close
Parameters
None
Returns
void. None.
default method
Macro: logdefault
Closes the log and reopens it to the default location.
default
Parameters
None
Returns
void. None.
logMsg method
Write a log message to the log, including a timestamp.
logMsgcontent
Parameters
Stringcontent
The content to write to the log. This content will be prefixed with the current locale time.
Returns
void. None.
open method
Macro: logopen
Opens the log to the specified location. If the log is already open, it will be closed first before the new log is created.
opentypepath
Parameters
inttype
The type of log to open.
Stringpath
The path for the new log. If type is LOG_FILE, this parameter should be an fPath object. If type is LOG_VARIABLE, this should be the name of the Perl variable to use. If type is LOG_STREAM, this should be the name of the stream to use including any PTC ALD namespaces if required. For any other types, this parameter will be ignored.
Returns
boolean. Returns true if the log was able to open successfully.
write method
Macro: logwrite
Write data to the log.
writecontent
Parameters
Stringcontent
The content to write to the log.
Returns
void. None.