new ArchLogging()
The singleton ArchLogging instance that is used for logging with Architect Scripting.
Members
-
static, readonly displayTypeName :string
-
Returns the display type name string 'ArchLogging'.
-
lastError :string
-
Holds the last error that was written out.
-
lastNote :string
-
Holds the last note that was written out.
-
lastWarning :string
-
Holds the last warning that was written out.
-
logErrors :boolean
-
Controls logging of errors, defaults to true
-
logNotes :boolean
-
Controls logging of notes, defaults to true
-
logNotesVerbose :boolean
-
Controls logging of verbose notes, defaults to false
-
logWarnings :boolean
-
Controls logging of warnings, defaults to true
Methods
-
logError()
-
Logs an error. This accepts parameters similar to how you would call console.log.
-
logErrorAndThrow(message)
-
Logs an error and then throws an exception with the supplied error message text.
Parameters:
Name Type Description message
string the error message to log.
-
logNote()
-
Logs a note. This accepts parameters similar to how you would call console.log.
-
logNoteVerbose()
-
Logs a verbose note. This accepts parameters similar to how you would call console.log.
-
logWarning()
-
Logs a warning. This accepts parameters similar to how you would call console.log.
-
setLoggingCallback(loggingCallback)
-
A method where you can pass in a callback function that will get called when Architect logging is going to log a message. This will let you intercept the message, perform your own logging and conditionally suppress the normal Architect console logging. See the callback definition for what will be passed on the callback function.
Parameters:
Name Type Description loggingCallback
callbackArchLoggingHook a callback method to receive information about what is going to be logged.