cinovo-logger-lib

Libraries for cinovo-logger and it's endpoints.

                                                   ___
       __                                         /\_ \
  ___ /\_\    ___     ___   __  __    ___         \//\ \     ___      __      __      __   _ __
 /'___\/\ \ /' _ `\  / __`\/\ \/\ \  / __`\  _______\ \ \   / __`\  /'_ `\  /'_ `\  /'__`\/\`'__\
/\ \__/\ \ \/\ \/\ \/\ \L\ \ \ \_/ |/\ \L\ \/\______\\_\ \_/\ \L\ \/\ \L\ \/\ \L\ \/\  __/\ \ \/
\ \____\\ \_\ \_\ \_\ \____/\ \___/ \ \____/\/______//\____\ \____/\ \____ \ \____ \ \____\\ \_\
 \/____/ \/_/\/_/\/_/\/___/  \/__/   \/___/          \/____/\/___/  \/___L\ \/___L\ \/____/ \/_/
                                                                      /\____/ /\____/
                                                                      \_/__/  \_/__/

cinovo-logger-lib

Shared code used by all cinovo-logger endpoints.

You must extend the require("cinovo-logger-lib").Endpoint.

var lib = require("cinovo-logger-lib");
function CustomEndpoint(debuginfoerrorcritical) {
    lib.Endpoint.call(this, debug, info, error, critical, "customName");
}
util.inherits(CustomEndpoint, lib.Endpoint);

And you must implement at least this two methods:

CustomEndpoint.prototype._log = function(logcallback) {
    // write the log object and call the callback if the log is written 
    callback();
};
CustomEndpoint.prototype._stop = function(callback) {
    // stop the endpoint, call the callback if finished and all logs are written 
    callback();
};

Stop endpoint to avoid data loss.

  • callback: Function(err)
    • err: Error
  • log: Log https://github.com/cinovo/node-logger#log
  • callback: Function(err)
    • err: Error

Endpoint was stopped.

Endpoint is stopping.