-
Notifications
You must be signed in to change notification settings - Fork 640
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
deprecation(log): move handlers to single-export files #4176
Conversation
const DEFAULT_FORMATTER = "{levelName} {msg}"; | ||
export type FormatterFunction = (logRecord: LogRecord) => string; | ||
|
||
export interface BaseHandlerOptions { |
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.
Note: this was previously HandlerOptions
in handlers.ts
.
* | ||
* This handler requires `--allow-write` permission on the log file. | ||
*/ | ||
export class FileHandler extends BaseHandler { |
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.
Note: this used to extend WriterHandler
in handlers.ts
.
@@ -137,6 +145,8 @@ interface FileHandlerOptions extends HandlerOptions { | |||
* exists. | |||
* | |||
* This handler requires `--allow-write` permission on the log file. | |||
* | |||
* @deprecated (will be removed in 0.214.0) Import from {@link https://deno.land/std/log/file_handler.ts} instead. | |||
*/ | |||
export class FileHandler extends WriterHandler { |
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.
Note: FileHandler
extends BaseHandler
in the new location.
} | ||
} | ||
|
||
override log(msg: string) { |
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.
Note: this override
is new. Shouldn't be breaking.
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. Nice work!
Towards #4174