TraceUser - Debug
Revision as of 16:33, 1 December 2015 by imported>Plplecuyer
Member of: Debug Script
Outputs a string to the specified user log on disk, and the Papyrus overlay. Returns true if the text was successfully output to the log.
Syntax
bool Function TraceUser(string asUserLog, string asTextToPrint, int aiSeverity = 0) native global debugOnly
Parameters
- asUserLog: The name of the user log to output to, case-insensitive. The log must be open.
- asTextToPrint: The text that should be printed to the log and text page.
- aiSeverity: The severity of the trace statement. Info, the default, will show up as green; warnings will show up as yellow; and errors as red; in the Papyrus debug text page.
- Default: 0 (Info)
- The following values are acceptable:
- 0: Info
- 1: Warning
- 2: Error
Return Value
True if the message was successfully logged. False on failure (usually you forgot to open the log).
Examples
; Outputs "Hello World" to the "myUserLog" log
Debug.TraceStack("myUserLog", "Hello World")
; Outputs "Houston, we have a problem" to the "myUserLog" log at error severity (colored red)
Debug.TraceStack("myUserLog", "Houston, we have a problem", 2)