How to use the log-driver.logger.error function in log-driver

To help you get started, we’ve selected a few log-driver 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 cainus / percolator / lib / Percolator.js View on Github external
this.server.on500(function(context, err){
    var req = context.req;
    var res = context.res;
    logger.error("===============================");
    logger.error("Uncaught Exception");
    logger.error(err);
    logger.error(req.method, ' ', req.url);
    logger.error(err.stack);
    try {
      res.status.internalServerError();
    } catch(ex){
      logger.error("error sending 500: ", ex);
    }
  });
github cainus / percolator / lib / Percolator.js View on Github external
this.server.on500(function(context, err){
    var req = context.req;
    var res = context.res;
    logger.error("===============================");
    logger.error("Uncaught Exception");
    logger.error(err);
    logger.error(req.method, ' ', req.url);
    logger.error(err.stack);
    try {
      res.status.internalServerError();
    } catch(ex){
      logger.error("error sending 500: ", ex);
    }
  });
github cainus / percolator / lib / Percolator.js View on Github external
this.server.on500(function(context, err){
    var req = context.req;
    var res = context.res;
    logger.error("===============================");
    logger.error("Uncaught Exception");
    logger.error(err);
    logger.error(req.method, ' ', req.url);
    logger.error(err.stack);
    try {
      res.status.internalServerError();
    } catch(ex){
      logger.error("error sending 500: ", ex);
    }
  });
github cainus / percolator / lib / Percolator.js View on Github external
this.server.on500(function(context, err){
    var req = context.req;
    var res = context.res;
    logger.error("===============================");
    logger.error("Uncaught Exception");
    logger.error(err);
    logger.error(req.method, ' ', req.url);
    logger.error(err.stack);
    try {
      res.status.internalServerError();
    } catch(ex){
      logger.error("error sending 500: ", ex);
    }
  });
github cainus / percolator / lib / Percolator.js View on Github external
function onStatusError (data){
  var req = data.req;
  var res = data.res;
  var uri = req.url;
  if (req.uri){
    uri = req.uri.toString();
  }
  logger.error(req.method, uri, res.statusCode, data.message, data.detail);
}
github cainus / percolator / lib / Percolator.js View on Github external
this.server.on500(function(context, err){
    var req = context.req;
    var res = context.res;
    logger.error("===============================");
    logger.error("Uncaught Exception");
    logger.error(err);
    logger.error(req.method, ' ', req.url);
    logger.error(err.stack);
    try {
      res.status.internalServerError();
    } catch(ex){
      logger.error("error sending 500: ", ex);
    }
  });
github cainus / percolator / lib / Percolator.js View on Github external
that.mediaTypes.connectMiddleware()(req, res, function(err){
            if (!!err) {
              if (err.match(/^Parse Error:/)){
                res.status.badRequest(err);
                return;
              }
              if (err === "Missing Content-Type"){
                res.status.unsupportedMediaType("None provided.");
                return;
              }
              if (err === "Unregistered content-type."){
                res.status.unsupportedMediaType(req.headers['content-type']);
                return;
              } 
              logger.error("post mediaTypes middleware error:");
              logger.error(err);
              return cb(err);
            } else {
              cb(null, context(req, res));
            }
          });
        } else {
github cainus / percolator / lib / Percolator.js View on Github external
this.server.on500(function(context, err){
    var req = context.req;
    var res = context.res;
    logger.error("===============================");
    logger.error("Uncaught Exception");
    logger.error(err);
    logger.error(req.method, ' ', req.url);
    logger.error(err.stack);
    try {
      res.status.internalServerError();
    } catch(ex){
      logger.error("error sending 500: ", ex);
    }
  });

log-driver

log-driver is a simple logging framework for logging to stdout

ISC
Latest version published 7 years ago

Package Health Score

62 / 100
Full package analysis