Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Issue #1410: Add 'timestamp' option to logger. #1411

Merged
merged 1 commit into from Mar 1, 2014

Conversation

3 participants

Add winston's timestamp option to Sails logger.

how would someone enable this feature? Is there documentation along with this change?

One can enable this by putting the timestamp variable in the log config.

module.exports = {
  log: {
    level: 'info',
    timestamp: true
  }
}

There's no documentation right now, but I can add it in. I'm not sure where to put it though.

Contributor

mikedevita commented Feb 17, 2014

👍 checkout balderdashy/sails-docs there should be a file there for it.

Heres the file you should update.. https://github.com/balderdashy/sails-docs/blob/master/config.log.md

russellsantos added a commit to russellsantos/sails-docs that referenced this pull request Feb 17, 2014

Added the documentation to the v0.9 branch on sails-docs, as requested.

Contributor

mikedevita commented Feb 17, 2014

👍

Owner

mikermcneil commented Feb 22, 2014

Hey @russellsantos, thanks! What would this look like for v0.10, in your opinion?

@mikermcneil, it looks like in v0.10, Sails uses Captain's Log, which doesn't use Winston by default.
People can use Winston, by using a custom logger. And they can pass the timestamp option to the logger itself.

So we don't really need to change any code for people to be able to do this in v0.10. They just need to pass a custom Logger in the configuration.

Owner

mikermcneil commented Mar 1, 2014

@russellsantos thanks!

mikermcneil added a commit that referenced this pull request Mar 1, 2014

Merge pull request #1411 from russellsantos/v0.9
Hotfix 0.9.x: Issue #1410: Add 'timestamp' option to logger.

@mikermcneil mikermcneil merged commit e4598f1 into balderdashy:v0.9 Mar 1, 2014

mikermcneil added a commit to balderdashy/sails-docs that referenced this pull request Mar 2, 2014

Merge pull request #91 from russellsantos/0.9
Documentation for balderdashy/sails#1411. Added timestamp config to ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment