matrix-js-sdk

    Class DebugLogger

    A Logger instance, suitable for use in ICreateClientOpts.logger, which will write to the debug library.

        import debug from "debug";

    const client = createClient({
    baseUrl: homeserverUrl,
    userId: userId,
    accessToken: "akjgkrgjs",
    deviceId: "xzcvb",
    logger: new DebugLogger(debug(`matrix-js-sdk:${userId}`)),
    });

    Implements

    Index

    Constructors

    Methods

    • Output debug message to the logger.

      Parameters

      • ...msg: any[]

        Data to log.

      Returns void

    • Output error message to the logger.

      Parameters

      • ...msg: any[]

        Data to log.

      Returns void

    • Create a child logger.

      This child will use the methodFactory of the parent, so any log extensions applied to the parent at the time of calling getChild will be applied to the child as well. It will NOT apply changes to the parent's methodFactory after the child was created. Those changes need to be applied to the child manually.

      Parameters

      • namespace: string

        name to add to the current logger to generate the child. Some implementations of Logger use this as a prefix; others use a different mechanism.

      Returns DebugLogger

    • Output info message to the logger.

      Parameters

      • ...msg: any[]

        Data to log.

      Returns void

    • Output trace message to the logger, with stack trace.

      Parameters

      • ...msg: any[]

        Data to log.

      Returns void

    • Output warn message to the logger.

      Parameters

      • ...msg: any[]

        Data to log.

      Returns void

    MMNEPVFCICPMFPCPTTAAATR