Giter Site home page Giter Site logo

meteor-logger's Introduction

Meteor Logger

A project to provide runtime configurable log messaging to your meteor apps.

Quick Start

$ mrt add logger

Key Concepts

Allows you to instrument your code both client and server side with log messages like this:

    Logger.log(Logger.Debug, 'Button clicked');
    Logger.log(Logger.Info, 'Data: '+Logger.stringify(data));
    Logger.log(Logger.Error, 'Error: '+Logger.stringify(err));

and then increase or decrease the amount of logging output at runtime e.g. just info, info and error, all etc.

Defaults

Default logging is for info and error messages only to be output - both for the client and server.

Runtime Configuration

Log settings can be change for client and server independently of one another at run time using the RuntimeConfigurationSettings collection (which will be created by this package). For example (at the mongo prompt):

db.runtimeConfigurationSettings.update({_id: 'client'}, {$set: {logMode: '[E]$'}});
db.runtimeConfigurationSettings.update({_id: 'server'}, {$set: {logMode: '[IED]$'}});

NOTE: logMode is a regular expression which will be used to test each log message to see whether or not to output it. Log modes are, as you might expect:

  • E: Error
  • I: Info
  • D: Debug

Depends on: no dependencies

meteor-logger's People

Contributors

lindleycb avatar

Watchers

James Cloos 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.