Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
add categories to loggers. fix #370
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jul 11, 2014
1 parent 4c02d84 commit d2d238d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var isTEST = process.env.NODE_ENV === 'test';
var levels = ['info', 'warn', 'error'];

module.exports = Logger({
categories: levels,
dir: config.logdir,
duration: '1d',
format: '[{category}.]YYYY-MM-DD[.log]',
Expand Down

4 comments on commit d2d238d

@dead-horse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看到 Info 和 warn 都是同步打的,是不是直接叫做 syncerror 之类的 category 更好

@fengmk2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

   at GeneratorFunctionPrototype.next (native)
    at GeneratorFunction.sync.listdiff (/home/www/git/cnpmjs.org/sync/sync_dist.js:214:28).Start syncing dist...sync remote:/ got 0 new items, 0 dirs, 0 files to syncSync / finished, 0 dirs, 0 filessync remote:/phantomjs/ got 0 files to syncSyncPhantomjsDir /phantomjs/ finished, 0 filesStart syncing dist...sync remote:/ got 0 new items, 0 dirs, 0 files to syncSync / finished, 0 dirs, 0 filessync remote:/phantomjs/ got 0 files to syncSyncPhantomjsDir /phantomjs/ finished, 0 files

@fengmk2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

日志好奇怪...

@dead-horse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有换行的原因吧?我改一下

这个前面那段是怎么打出来的?

Please sign in to comment.