GithubHelp home page GithubHelp logo

reinyan / logcafe.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cyberagent/logcafe.js

0.0 1.0 0.0 98 KB

LogCafe.js is a logging framework to support browser application logging. (amd-style and node.js support)

License: MIT License

logcafe.js's Introduction

logcafe.js

About

LogCafe.js is a logging framework to support browser application logging. (amd-style and node.js support)

Usage (node.js)

$ node
> var LogCafe = require('logcafe');
> var logCafe = new LogCafe();

> var conf = { // configure
...     level: 'DEBUG',
...     separator: ', '
... };

> logCafe.setConfigure(conf); // set configure
{ loggers: {},
  config: { level: 'DEBUG', separator: ', ' } }

> var log = logCafe.getLogger('logcafe'); // set Logger
> log.info('logger succesfully got', 'test'); // output log
[info][logcafe] logger succesfully got, test (......:xx:yy)

Usage (browser)

var logCafe = new LogCafe();

var conf = { // configure
    level: 'DEBUG',
    separator: ', '
};

logCafe.setConfigure(conf); // set configure

var log = logCafe.getLogger('logcafe'); // set Logger

log.info('logger succesfully got', 'test'); // output log

>> [info][logcafe] logger succesfully got, test (......:xx:yy)

Configure

{
    level: 'DEBUG', // OFF|TRACE|DEBUG|INFO|WARN|ERROR
    separator: ', ' // Consolidation of argument, it is a separator.
    excludes: [] // Exclude category forward match
}

Operating environment

  • node.js
  • require.js
  • browser

Build

dependence) node.js

$ npm install .

$ make

Test (browser)

$ open ./spec/all.html

Test (node.js)

$ npm install . # deps install
$ make test

info: checking node_modules.
if [ ! -d ./node_modules ]; then npm install .; else exit 0; fi

info: testing start.
./node_modules/mocha/bin/mocha test/

  [info][logcafe] logger succesfully got (/Users/fkei/repos/logcafe.js/test/test.logcafe.js:28:17)
․

  1 test complete (16 ms)

AUTHORS

Kei FUNAGAYAMA

Kazuma MISHIMAGI

CyberAgent Publicity

Changelog

@see https://github.com/CyberAgent/logcafe.js/blob/master/Changelog

Copyright

CyberAgent, Inc. All rights reserved.

License

MIT @see https://github.com/CyberAgent/logcafe.js/blob/master/LICENSE

logcafe.js's People

Contributors

fkei avatar

Watchers

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