If true, no messages will be written to the console. This is useful in production to avoid logging sensitive information to the console.
Logs the message as critical.
the error to log; can be a string or an error object
// log a critical error message
tisa.log.critical("some critical error message");
// log a critical error message and show toast
tisa.log.critical("some critical error message", { showToast: true });
// log a critical error message, show toast, pass a unique error id, add custom properties, add console params and pass the error object
tisa.log.critical("some critical error message", {
showToast: true,
id: "1234567890",
customProperties: { customProperty: "custom value" },
consoleParams: ["some console param"],
error: new Error("some error")
});
// log an error object as critical
tisa.log.critical(new Error("some critical error message"));
Logs the message as debug.
the message to log
Logs the message as error.
the error to log; can be a string or an error object
// log an error message
tisa.log.error("some error message");
// log an error message and show toast
tisa.log.error("some error message", { showToast: true });
// log an error message, show toast, pass a unique error id, add custom properties, add console params and pass the error object
tisa.log.error("some error message", {
showToast: true,
id: "1234567890",
customProperties: { customProperty: "custom value" },
consoleParams: ["some console param"],
error: new Error("some error")
});
// log an error object as error
tisa.log.error(new Error("some error"));
Logs the message as information.
the message to log
Logs the message as trace.
the message to log
Logs the message as warning.
the message to log
// log a warning message with a string
tisa.log.warn("some warning message");
// log a warning message with a string and show toast
tisa.log.warn("some warning message", { showToast: true });
// log a warning message with an error object
tisa.log.warn("some warning message", { showToast: true, error: new Error("some error") });
Logs messages to the console and Application Insights. Optionally shows a toast with the logged message in the UI.
Example