Git Product home page Git Product logo

logger's Introduction

Logger

This codebase contains a logger written in TypeScript. It's simple to use, just import it's class and create a new instance

import Log from "./logger";

const Logger = new Log().log;

Logger("error", "This is an error!");
Logger("warn", ["This", "is", "a", "warning"]);
Logger("info", {
  service: "Logger",
  version: 1,
  author: "Francis Onukwu",
});

Guide

  • The first argument of the log method takes a string of "error", "warn" or "info".
  • The second argument is the value you want to log.
  • It has an object as its optional third parameter, you can specify if you want a verbose log or not
{verbose: <boolean>}

‼ Note

  • Verbose is disabled by default for production environments.
  • It automatically creates log files in a chronological order and saves them to ./logs

For support and enquiries - [email protected]

logger's People

Contributors

onfranciis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.