Giter Site home page Giter Site logo

easy.log.js's Introduction

easy.log.js

A good log module for browser.More convenient and elegant.

Tip: easy.log.js also support wechat mini program, the usage is the same.

Feature

  • print every log with a group name, then you can filter logs in console tab
  • every log has stack info, easily for debugging
  • you can turn off logging for all groups or specific group

Install

Recommended way is by npm

npm install --save easy.log.js

Also support using by script

<script src="dist/easy.log.js"></script>

Usage

For webpack project

import LOG from 'easy.log.js'
let log1 = LOG("group-name-1");
log1("log");
log1.log("log");
log1.warn("warn");
log1.error("error");

For normal script insert usage, easy.log.js export one global variable named LOG

let log1 = LOG("group-name-1");
// ...

Tip

easy.log.js is just for browsers.
Though easy.log.js can run in nodejs environment, you could not need it. Try log4js, it can write logs to file.

License

MIT

easy.log.js's People

Contributors

ajlovechina avatar panda-tv avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

godxkey

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.