How to use the loglevel.trace function in loglevel

To help you get started, we’ve selected a few loglevel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github finos / plexus-interop / web / packages / common / src / logger / LoggerBase.ts View on Github external
public log(logLevel: LogLevel, msg: string, args: any[]): void {

        let actualMessage = `${this.name} ${msg}`;

        switch (logLevel) {
            case LogLevel.TRACE: 
                log.trace(actualMessage, args); 
                break;
            case LogLevel.DEBUG: 
                log.debug(actualMessage, args); 
                break;
            case LogLevel.INFO: 
                log.info(actualMessage, args); 
                break;
            case LogLevel.WARN: 
                log.warn(actualMessage, args); 
                break;
            case LogLevel.ERROR: 
                log.warn(actualMessage, args); 
                break;
            case LogLevel.SILENT: 
                /* be silent */
                break;
github gitterHQ / desktop / nwapp / index.js View on Github external
mainWindow.on('blur', function () {
    log.trace('mainWindow:blur');
    mainWindowFocused = false;
    // TODO: Remove this hack
    var toExec = "var cf = document.getElementById('content-frame'); if (cf) cf.contentWindow.dispatchEvent(new Event('blur'));";
    mainWindow.eval(mainWindow.window.document.getElementById('mainframe'),toExec);
  });
github SonyCSLParis / NONOTO / src / renderer / playback.ts View on Github external
Instruments.getCurrentInstrument().pedalUp(time);
        }
    }, midiTrack.controlChanges[64]).start(0);

    let noteOffEvents = new Tone.Part((time, event) => {
        Instruments.getCurrentInstrument().keyUp(
            event.midi, time, event.velocity);
    }, midiTrack.noteOffs).start(0);

    let noteOnEvents = new Tone.Part((time, event) => {
        Instruments.getCurrentInstrument().keyDown(
            event.midi, time, event.velocity);
    }, midiTrack.notes).start(0);

    log.trace('Midi track content');
    log.trace(midiTrack.noteOffs);
    log.trace(midiTrack.notes);

    // set correct loop points for all tracks and activate infinite looping
    for (let part of [sustain, noteOffEvents, noteOnEvents]) {
        part.loop = true;
        part.loopEnd = sequenceDuration_toneTime;
    }
}
github esrlabs / chipmunk / application / apps / indexer-neon / src / tests.ts View on Github external
f: () => {
            let timestamp;
            try {
                timestamp = indexer.detectTimestampInString(
                    "109.169.248.247 - - [13/Dec/2015:18:25:11 +0100] GET /administrator",
                );
            } catch (error) {
                log.error("error getting timestamp");
            }
            log.trace(timestamp);
        },
    });
github esrlabs / chipmunk / application / apps / indexer-neon / src / tests.ts View on Github external
f: () => {
            let merged_lines: number = 0;
            let onResult = (res: IChunk) => {
                log.trace("rowsEnd= " + JSON.stringify(res));
                merged_lines = res.rowsEnd;
            };
            log.trace("inside f measure");
            const contents = fs.readFileSync(mergeConf, "utf8");
            log.trace(`contents is: ${contents}`);
            const config: Array = JSON.parse(contents);
            log.trace(`config is: ${JSON.stringify(config)}`);
            const filePath = require("path").dirname(mergeConf);
            const absolutePathConfig: Array = config.map(
                (input: IMergerItemOptions) => {
                    log.trace(`input is: ${JSON.stringify(input)}`);
                    input.name = require("path").resolve(filePath, input.name);
                    return input;
                },
            );
            log.trace(`absolutePathConfig: ${JSON.stringify(absolutePathConfig)}`);
            const promise: CancelablePromise<
                void,
                void,
github gitterHQ / desktop / nwapp / index.js View on Github external
client.on('change:userId', function (userId) {
    events.emit('realtime:connected', rooms);
    log.trace('realtime connected()');

    if (!client) return;
    log.trace('attempting to subscribe()');
    var subscription = client.subscribe('/v1/user/' + userId, function (msg) {
      if (mainWindowFocused || !msg.notification) return;

      if (msg.notification === 'user_notification') {
        notifier({
          title: msg.title,
          message: msg.text,
          icon: msg.icon,
          click: function() {
            log.info('Notification user_notification clicked. Moving to', msg.link);
            navigateWindowTo(msg.link);
          }
        });
github gitterHQ / desktop / nwapp / index.js View on Github external
function showLoggedInWindow(exec) {
  log.trace('showLoggedInWindow()');

  mainWindow = gui.Window.get(
    window.open('loggedin.html', {
      focus: true
    })
  );

  mainWindow.setMinimumSize(400, 200);

  var menu = new CustomMenu({
    items: MENU_ITEMS,
    label: 'Gitter',
    filter: function (item) {

      if (item.support && item.support.indexOf(CLIENT) < 0 ) {
        return false;
github gitterHQ / desktop / nwapp / index.js View on Github external
function fetchAllCookies() {
  log.trace('fetchAllCookies()');
  return new Promise(function (resolve) {
    win.cookies.getAll({}, function (cookies) {
      resolve(cookies);
    });
  });
}
github google / closure-builder / closure-builder.js View on Github external
log.debug('Required ECMAVersion:', config.requiredECMAVersion);
  log.debug('Require closure export:', config.requireClosureExport);
  log.debug('Require closure library:', config.requireClosureLibrary);
  log.debug('Require soy i18n:', config.requireSoyi18n);
  log.debug('Require soy library:', config.requireSoyLibrary);
  log.debug('License file:', config.license);

  log.debug('Found', config.hasSoyFiles(), 'soy files.');
  log.trace(config.getSoyFiles());

  log.debug('Found', config.hasClosureFiles(), 'closure files.');
  log.trace(config.getClosureFiles());

  log.debug('Found', config.hasClosureStylesheetsFiles(),
    'closure stylesheets files.');
  log.trace(config.getClosureStylesheetsFiles());

  log.debug('Found', config.hasCssFiles(), 'css files.');
  log.trace(config.getCssFiles());

  log.debug('Found', config.hasJsFiles(), 'JavaScript files.');
  log.trace(config.getJavaScriptFiles());

  log.debug('Found', config.hasMarkdownFiles(), 'markdown files.');
  log.trace(config.getMarkdownFiles());

  log.debug('Found', config.hasResourceFiles(), 'resources files.');
  log.trace(config.getResourceFiles());
};
github kiibohd / configurator / src / renderer / configure / buttons / compile-firmware.js View on Github external
async function compile(baseUri, variant) {
  try {
    const config = currentConfig();
    const payload = { config, env: 'latest' };
    log.trace(config);
    const uri = urljoin(baseUri, 'download.php');
    const response = await fetch(uri, {
      method: 'POST',
      cache: 'no-cache',
      headers: {
        'Content-Type': 'application/json; charset=utf-8'
      },
      body: JSON.stringify(payload)
    });
    log.trace(response);

    if (response.status !== 200) {
      log.error('Failed to compile.');
      let details = (await response.json()) || {};
      return { success: false, error: 'Compilation Failed', log: details.error };
    }