How to use @lykmapipo/logger - 10 common examples

To help you get started, we’ve selected a few @lykmapipo/logger 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 CodeTanzania / ewea / src / worker.js View on Github external
require('@codetanzania/ewea-common');
const { error, debug } = require('@lykmapipo/logger');
const { start, listen } = require('@lykmapipo/postman');
const { connect } = require('./database');

debug('Start Launching Worker');

// connect to database
connect(err => {
  // throw if error
  if (err) {
    error('Fail Launching Worker', err);
    throw err;
  }

  // TODO: worker job events

  // start kue worker
  start();

  // start kue http & ui
  listen();
github CodeTanzania / ewea / src / worker.js View on Github external
connect(err => {
  // throw if error
  if (err) {
    error('Fail Launching Worker', err);
    throw err;
  }

  // TODO: worker job events

  // start kue worker
  start();

  // start kue http & ui
  listen();

  debug('Finish Launching Worker');
});
github CodeTanzania / ewea / src / server.js View on Github external
require('@codetanzania/ewea-common');
const { error, debug } = require('@lykmapipo/logger');
const { start } = require('./http');

debug('Start Launching Http Server');

// start http server
start((err, { PORT }) => {
  // throw if error
  if (err) {
    error('Fail Launching Http Server', err);
    throw err;
  }

  debug(`Http Server Running At http://0.0.0.0:${PORT}`);

  debug('Finish Launchin Http Server');
});
github CodeTanzania / ewea / src / server.js View on Github external
start((err, { PORT }) => {
  // throw if error
  if (err) {
    error('Fail Launching Http Server', err);
    throw err;
  }

  debug(`Http Server Running At http://0.0.0.0:${PORT}`);

  debug('Finish Launchin Http Server');
});
github CodeTanzania / ewea / src / worker.js View on Github external
connect(err => {
  // throw if error
  if (err) {
    error('Fail Launching Worker', err);
    throw err;
  }

  // TODO: worker job events

  // start kue worker
  start();

  // start kue http & ui
  listen();

  debug('Finish Launching Worker');
});
github CodeTanzania / ewea / src / server.js View on Github external
start((err, { PORT }) => {
  // throw if error
  if (err) {
    error('Fail Launching Http Server', err);
    throw err;
  }

  debug(`Http Server Running At http://0.0.0.0:${PORT}`);

  debug('Finish Launchin Http Server');
});
github CodeTanzania / ewea / scripts / syncIndexes.js View on Github external
syncIndexes((error, results) => {
  if (error) {
    warn('Fail Syncing Indexes', error);
  } else {
    debug('Finish Syncing Indexes', results);
  }
  process.exit(0);
});
github CodeTanzania / ewea / scripts / syncIndexes.js View on Github external
require('@codetanzania/ewea-common');
const { warn, debug } = require('@lykmapipo/logger');
const { syncIndexes } = require('../src/database');

debug('Start Syncing Indexes');

syncIndexes((error, results) => {
  if (error) {
    warn('Fail Syncing Indexes', error);
  } else {
    debug('Finish Syncing Indexes', results);
  }
  process.exit(0);
});
github CodeTanzania / ewea / scripts / seedData.js View on Github external
waterfall(tasks, error => {
  if (error) {
    warn('Fail Seeding Data', error);
  } else {
    debug('Finish Seeding Data');
  }
  process.exit(0);
});
github CodeTanzania / ewea / scripts / seedData.js View on Github external
waterfall(tasks, error => {
  if (error) {
    warn('Fail Seeding Data', error);
  } else {
    debug('Finish Seeding Data');
  }
  process.exit(0);
});

@lykmapipo/logger

Naive logging helpers

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis