-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Documentation: README.md suggest a broken way to extend BaseLogger
#256
Comments
I guess the README could be upgraded to: import { BaseLogger, Runtime } from 'tslog'
export class CustomLogger<LogObj> extends BaseLogger<LogObj> {
constructor(settings?: ISettingsParam<LogObj>, logObj?: LogObj) {
super(Runtime, settings, logObj, 5);
}
} |
Also this part is broken now: public custom(...args: unknown[]): LogObj & ILogObjMeta {
return super.log(8, "CUSTOM", ...args);
} because |
Thank you for pointing this out. You're right. I'll update the docs. |
To be honest, it shouldn't have happened, especially since it was just a minor update. I must have overlooked that during a PR merge. Sorry about that. |
Solved in |
Probably should have opened a separate issue, but I thought both were about updateing documentation. So the part about |
Thank you, I updated the docs: https://github.com/fullstack-build/tslog#custom-log-level |
Describe the bug
The documentation here suggests to extend
BaseLogger
as:However since v4.8.3
constructor
ofBaseLogger
was changed to include a new first parameterruntime
.What is the recommended way to extend the logger now?
The text was updated successfully, but these errors were encountered: