Hierarchy

  • SecureLoggerCordovaInterface

Constructors

Properties

eventFlushErrorCallback: EventFlushErrorCallback = null

Customizable callback to handle when event cache flush fails.

flushEventCacheProxy: (() => void) = ...

Type declaration

    • (): void
    • Returns void

mCacheFlushInterval: any = null
mCachingEnabled: boolean = false
mEventCache: SecureLogEvent[] = []
mFlushIntervalDelayMs: number = 250
mMaxCachedEvents: number = 1000
recycleEventsOnFlushFailure: boolean = true

When true, will attempt to re-insert the events that failed to be flushed into the beginning of the cache.

Accessors

  • get cachingEnabled(): boolean
  • Current state of caching / event flush interval. Use setEventCacheFlushInterval() and disableEventCaching() to enable and disable (respectively) caching and flush interval usage.

    Returns boolean

Methods

  • Uses native-level formatting, and automatically inserts newlines between events when writing formatted content to the log cache.

    Parameters

    Returns Promise<void>

  • Writes the given text directly to the log cache without any preprocessing.

    Parameters

    • text: string

    Returns Promise<void>

  • Disables the flush interval if one is set. NOTE: this will leave the current event cache buffer in-tact. To also clear the buffer, call disableEventCaching() instead.

    Returns void

  • Manually close the current active file stream which logs are being written to.

    Call this if your app is about to close and you want to prevent potential log data loss

    (e.g. if the app is about to be killed non-gracefully and native on-destroy callbacks will not get called)

    Returns Promise<void>

  • Queues a new log event with the given data and level of DEBUG

    Parameters

    • tag: string
    • message: string
    • Optional timestamp: number

    Returns void

  • Completely disables event caching on this interface, and clears any buffered events. NOTE: convenience methods that use log() will do nothing until caching is turned back on.

    Returns void

  • Queues a new log event with the given data and level of ERROR

    Parameters

    • tag: string
    • message: string
    • Optional timestamp: number

    Returns void

  • Queues a new log event with the given data and level of FATAL

    Parameters

    • tag: string
    • message: string
    • Optional timestamp: number

    Returns void

  • Convenience for flushing any queued events before actually closing the current stream.

    Returns Promise<void>

  • Manually flush the current set of cached events. Useful for more pragmatic teardown sequencing.

    Returns Promise<void>

  • Retrieves a single blob of log data which contains all current log files stitched back together chronologically.

    Returns Promise<ArrayBuffer>

  • Queues a new log event with the given data and level of INFO

    Parameters

    • tag: string
    • message: string
    • Optional timestamp: number

    Returns void

  • Generates a log event that will be cached for the next event flush cycle, where all cached events will be handed to the plugin. If this would cause the cache to become larger than maxCachedEvents, the oldest item from the cache is removed after this new event is added.

    Parameters

    • level: SecureLogLevel
    • tag: string
    • message: string
    • timestamp: number = ...

    Returns void

  • Change the output state of Timber/Lumberjack native logs. When enabled, native logs will show in logcat/xcode.

    Parameters

    • enabled: boolean

    Returns Promise<void>

  • Sets the interval at which cached events will be flushed and sent to the native logging system. If no interval value provided, the current value of flushIntervalDelayMs will be used.

    Parameters

    • Optional intervalMs: number

    Returns void

  • Alias of verbose()

    Parameters

    • tag: string
    • message: string
    • Optional timestamp: number

    Returns void

  • Queues a new log event with the given data and level of VERBOSE

    Parameters

    • tag: string
    • message: string
    • Optional timestamp: number

    Returns void

  • Queues a new log event with the given data and level of WARN

    Parameters

    • tag: string
    • message: string
    • Optional timestamp: number

    Returns void

Generated using TypeDoc