TreeINFO-For-M365 documentation
    Preparing search index...

    Specifies the options for logging a message in Log methods.

    // log an info message and show a toast
    tisa.log.info("some info message", { showToast: true });

    // log a warning message with custom properties and console params
    tisa.log.warn("some warning message", { customProperties: { customProperty: "custom value" }, consoleParams: ["some console param"] });

    // log an error message with an error object
    tisa.log.error("some error message", { error: new Error("some error") });
    interface LogOptions {
        consoleParams?: any[];
        customProperties?: any;
        error?: Error;
        showToast?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    consoleParams?: any[]

    Additional params that will be appended when logging to the console.

    customProperties?: any

    Additional properties that will be sent to Application Insights. This property will also be appended when logging to the console.

    error?: Error

    Passes 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 });
    showToast?: boolean

    If true, shows a toast with the logged message in the UI.