OptionalconsoleAdditional params that will be appended when logging to the console.
OptionalcustomAdditional properties that will be sent to Application Insights. This property will also be appended when logging to the console.
OptionalerrorPasses an error object for all log methods. This is useful when an event contains an error as a string. For critical and error, the error object is logged as a tracked exception in Application Insights and written to the console as an error. For other methods, the error object is logged only to the console.
const error = new Error("this error object will be logged in Application Insights and written to the console");
// log a critical error message
tisa.log.critical("some critical error message", { error });
// log an error message
tisa.log.error("some error message", { error });
// log a warning message
tisa.log.warn("some warning message", { error });
// log an info message
tisa.log.info("some info message", { error });
// log a debug message
tisa.log.debug("some debug message", { error });
// log a trace message
tisa.log.trace("some trace message", { error });
OptionalshowIf true, shows a toast with the logged message in the UI.
Specifies the options for logging a message in Log methods.
Example