0.0.2 • Published 7 years ago

@jenkins-cd/diag v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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 (and env-variable) 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.

0.0.3-tfbeta2

7 years ago

0.0.3-tfbeta1

7 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.1-beta5

8 years ago

0.0.1-beta4

8 years ago

0.0.1-beta3

8 years ago

0.0.1-beta2

8 years ago

0.0.1-beta1

8 years ago