Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@coobo/spendfy-logger

Coobo20MIT1.0.0-a

Universal Logger for spendfy modules and services

readme

universal-logger

Universal Logging module for spendfy's services

Use Case

import { SystemLogger, APILogger, SQLLogger } from '@coobo/spendfy-logger';

Levels

// System
{
  "levels": {
    "error": 0,
    "warn": 1,
    "info": 2,
    "verbose": 3,
    "debug": 4,
    "silly": 5
  },
  "colors": {
    "error": "red",
    "warn": "yellow",
    "info": "green",
    "verbose": "cyan",
    "debug": "blue",
    "silly": "magenta"
  }
}
// API
{
  "levels": {
    "DELETE": 0,
    "PATCH": 1,
    "PUT": 2,
    "POST": 3,
    "GET": 4,
    "OPTIONS": 5
  },
  "colors": {
    "DELETE": "red",
    "PATCH": "cyan",
    "PUT": "blue",
    "POST": "yellow",
    "GET": "green",
    "OPTIONS": "black"
  }
}
// SQL
{
  "levels": {
    "DELETE": 0,
    "UPDATE": 1,
    "INSERT": 2,
    "SELECT": 3
  },
  "colors": {
    "DELETE": "red",
    "UPDATE": "magenta",
    "INSERT": "green",
    "SELECT": "cyan"
  }
}

To publish the package:

git tag -a ${VERSION} -m "${TAG_MESSAGE}"
npm publish --access public

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

v1.0.0-a - 2019-05-21

Added

  • Testing environment now output all logs to a silent Console (nothing shows on test reports);
  • The logger now outputs the expressLogger in order to keep version compatible across spendfy apps.

Changed

  • Updated winston-daily-rotate-file;
  • Updated winston-mongodb;
  • Updated yn.

0.0.3-alpha - 2019-02-11

Added

  • Automated test for all environments

Changed

  • Development SQL Logger no longer transports to FILE