Class BugfenderClass

Implements

  • BugfenderFacade

Methods

  • Parameters

    • obj: unknown

      A JavaScript value to output

    • Rest ...objs: unknown[]

      List of optional JavaScript values to output

    Returns void

  • String message with optional substitutions. This mimicks que the window.console template messages. Learn more in MDN.

    Parameters

    • msg: string

      Message with optional % placeholders

    • Rest ...subst: unknown[]

      Optional substitutions list

    Returns void

  • Parameters

    • obj: unknown

      A JavaScript value to output

    • Rest ...objs: unknown[]

      List of optional JavaScript values to output

    Returns void

  • String message with optional substitutions. This mimicks que the window.console template messages. Learn more in MDN.

    Parameters

    • msg: string

      Message with optional % placeholders

    • Rest ...subst: unknown[]

      Optional substitutions list

    Returns void

  • Force send logs. Synchronizes all logs and issues with the server once, regardless if this device is enabled or not. Logs and issues are synchronized only once. After that, the logs are again sent according to the enabled flag in the Bugfender Console.

    Returns void

  • Returns Promise<string>

    Bugfender dashboard URL for the device

  • Returns Promise<string>

    Bugfender dashboard URL for the current session

  • Show a modal which asks for feedback. Once the user closes the modal or sends the feedback the returned promise resolves with the result.

    Bugfender.getUserFeedback().then((result) => {
    if (result.isSent) {
    // User sent the feedback
    // `result.feedbackURL` contains the Bugfender feedback URL
    } else {
    // User closed the modal without sending the feedback
    }
    });

    Parameters

    Returns Promise<UserFeedbackResult>

    Promise which resolves once the user closes the modal or sends the feedback

  • Parameters

    • obj: unknown

      A JavaScript value to output

    • Rest ...objs: unknown[]

      List of optional JavaScript values to output

    Returns void

  • String message with optional substitutions. This mimicks que the window.console template messages. Learn more in MDN.

    Parameters

    • msg: string

      Message with optional % placeholders

    • Rest ...subst: unknown[]

      Optional substitutions list

    Returns void

  • Initialize Bugfender SDK

    Before calling any other method the SDK must be initilized using this method. Only after initialization the global error handler (registerErrorHandler) and window.console overrides (overrideConsoleMethods) will be available.

    Parameters

    • options: SDKOptions

      Options object. The only required property is appKey.

    Returns Promise<void>

  • Parameters

    • obj: unknown

      A JavaScript value to output

    • Rest ...objs: unknown[]

      List of optional JavaScript values to output

    Returns void

  • String message with optional substitutions. This mimicks que the window.console template messages. Learn more in MDN.

    Parameters

    • msg: string

      Message with optional % placeholders

    • Rest ...subst: unknown[]

      Optional substitutions list

    Returns void

  • Remove a device associated key-value pair. Learn more.

    Parameters

    • key: string

      Key identifier

    Returns void

  • Send a crash report.

    Parameters

    • title: string

      Title

    • text: string

      Text content

    Returns Promise<string>

    Bugfender dashboard URL for the crash.

  • Send an issue.

    Parameters

    • title: string

      Title

    • text: string

      Text content

    Returns Promise<string>

    Bugfender dashboard URL for the issue.

  • Use this method if you need more control over the data sent while logging. See ILogEntry interface reference to see all the accepted properties.

    Parameters

    • log: LogEntry

      Log object that complies with ILogEntry interface.

    Returns void

  • Send an user feedback.

    Parameters

    • title: string

      Title/Subject

    • text: string

      Text content

    Returns Promise<string>

    Bugfender dashboard URL for the feedback.

  • Set a device associated key-value pair. Learn more.

    Parameters

    • key: string

      Key identifier.

    • value: DeviceKeyValue

      Value.

    Returns void

  • Force a device enabled.

    Parameters

    • state: boolean

      State of the enforcement

    Returns void

  • Parameters

    • obj: unknown

      A JavaScript value to output

    • Rest ...objs: unknown[]

      List of optional JavaScript values to output

    Returns void

  • String message with optional substitutions. This mimicks que the window.console template messages. Learn more in MDN.

    Parameters

    • msg: string

      Message with optional % placeholders

    • Rest ...subst: unknown[]

      Optional substitutions list

    Returns void

  • Parameters

    • obj: unknown

      A JavaScript value to output

    • Rest ...objs: unknown[]

      List of optional JavaScript values to output

    Returns void

  • String message with optional substitutions. This mimicks que the window.console template messages. Learn more in MDN.

    Parameters

    • msg: string

      Message with optional % placeholders

    • Rest ...subst: unknown[]

      Optional substitutions list

    Returns void