-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement formatters for log #127
Conversation
log/handlers.ts
Outdated
this._filename = filename; | ||
constructor( | ||
levelName: string, | ||
options: FileHandlerOptions = { filename: "log.txt" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just placeholder filename, I want to know your opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not so happy with having an options interface with only one item in it. (cc @piscisaureus)
It seems if you're constructing a FileHandler
, specifying a filename should be part of the process - i.e. no default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's two items, because FileHandlerOptions
has filename
and formatter
. +1 for no default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Based on discussion in #39 I'm making first pass at implementing formatters for log module.
This is already working and here are examples (they have exactly same output)
1.
CC @ry @hayd