Git Product home page Git Product logo

pozeray's Introduction

Pozeray

Pozeray is a tool for logging front-end JavaScript.

Cons of the standard console object

It is easy to use console to output logging informations like errors, warnings, infos, etc. However

  • each browser has different implementation for the console object. Some browsers have more methods, others have less.
  • the UI of the console is different in each browser
  • there are too many redundant messages in the browsers native console panel
  • it is impossible to group somehow the logged messages with the standard console

Pros of using Pozeray loggers

  • Pozeray loggers are the same in all browsers.
  • Each logged message has an area attached to it. This allows to group messages nicely and filter them easily.

How to use it

Currently Pozeray has these methods to log messages: error, warn, info, log, debug. All of them have one input parameter - the message.

There is a preinitialized logger for logging messages in the "Default" area. This logger is accessible through the $logger global variable. E.g., logging an error in the default area

$logger.error('Oops, something went very wrong!');

In order to use a new area, a new Logger has to be created. E.g., creating a Logger in the "Tracking" area and logging a warning

var trackingLogger = new Logger({ area: 'Tracking'});
trackingLogger.warn('This a tracking warning.');

pozeray's People

Contributors

zkochan avatar

Watchers

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