GithubHelp home page GithubHelp logo

kafkadev / logger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roeelupo/logger

0.0 0.0 0.0 50 KB

Minimalist, dependency-free, lightning fast NodeJS logging tool

Home Page: https://www.npmjs.com/package/@mrsheldon/logger

License: MIT License

JavaScript 100.00%

logger's Introduction

Logger

Minimalist, dependency-free, lightning fast NodeJS logging tool

PayPal


Information

A minimalist, dependency-free, lightning fast logger made for https://discord.boats and my other NodeJS projects

Showcase

#

Installing

Use npm i @mrsheldon/logger

Usage

const logger = require("@mrsheldon/logger")

const Logger = new logger({options})

Logger.debug("debug")
Logger.warning("warning")
Logger.error("error")
Logger.fatal("fatal")
Logger.success("success")
Logger.info("info")
Logger.trace("trace")

Options

Name Default Value Required Description
file_save false No Decides if it will save the errors and warnings to the file
file_dir __dirname + '/logs/debug.log' No Decides where the log file will be created
file_format '[{date} - {time}] [{type}] : {message}' No Sets the format of the file log
format '[{date} - {time}] {type} : {message}' No Sets the format of the console log

Available format arguments

Name Description Example
{message} The log message Error in index.js
{date} The full date 06/04/2020
{time} The full time 11:55:52
{year} The full year (from the {date}) 2020
{month} The month (from the {date}) 06
{day} The day (from the {date}) 04
{hour} The hour (from the {time}) 11
{minute} The minute (from the {time}) 55
{second} The second (from the {time}) 52

Notice

Only warnings, errors and fatal errors are saved to the file, customization to be added soon

Contributing

Contributions are always welcome to this project!
Take a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project.

Please make sure to follow the existing standards within the project such as code styles, naming conventions and commenting/documentation.

When you are ready, simply create a pull request for your contribution and I will review it whenever I can!

Donating

You can also help me and the project out by contributing through a donation on PayPal or by supporting me monthly on my Patreon page.

PayPal

Issues

If you have an issue, please create a GitHub issue here to report the situation, include as much detail as you can!

logger's People

Contributors

roeelupo 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.