@jenkins-cd/diag

    0.0.2 • Public • Published

    Jenkins client-side Diagnostics

    Installation

    npm install --save @jenkins-cd/diag
    

    logger(category)

    Get a LOGGER for the specified category.

    var LOGGER = require('@jenkins-cd/diag').logger('sse');
     
    // Log messages etc . See below.

    error(message [, other-args])

    var LOGGER = require('@jenkins-cd/diag').logger('sse');
     
    LOGGER.error('Invalid SSE event message format.', event);

    Error logs are always logged, so no configuration needed here.

    debug(message [, other-args])

    Currently, this module uses the enabled package for logging debug messages.

    NOTE: One slight terminology difference between this package and the enabled package is that this package uses the term "category" (log "category") where enabled uses the term "namespace"/"name". Aside from that, everything else is the same.

    var LOGGER = require('@jenkins-cd/diag').logger('sse');
     
    LOGGER.debug(`SSE event ${event.jenkins_channel}/${event.jenkins_event}:`, event);

    Please see the enabled docs for how to turn on/off debug logging in the Browser.

    isDebugEnabled()

    Returns true if debug logging is enabled for the category associated with the logger instance.

    Keywords

    none

    Install

    npm i @jenkins-cd/diag

    DownloadsWeekly Downloads

    10

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • nicupascu
    • vivekp
    • imeredith
    • tfennelly
    • bwalding
    • kohsuke
    • sophistifunk
    • scherler
    • kzantow