-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
logtape·meta
logs unexpectedly
#23
Comments
logtape·meta
meta logs unexpectedlylogtape·meta
logs unexpectedly
You can suppress it by configuring the meta logger with a higher log level than await configure({
sinks: { console: getConsoleSink() },
loggers: [
{
category: ["logtape", "meta"],
level: "warning",
sinks: ["console"],
},
{
category: "my-app",
level: "info",
sinks: ["console"],
},
],
}); |
Thanks for the reply, I appreciate it. However I find this unintuitive and not a great first impression. The log message says:
This implies I have somehow configured it by mistake, and that it's not a default behavior of the library (which it seems to be?). Additionally, why do the internals of this logging library log something by default? This is not a behavior I've ever seen with other logging libraries and comes off as a bug. |
Indeed that's misleading. It's probably because English is not my first language. I'll adjust the message.
As sometimes a sink can fail to record a log message, I think such meta logs should be recorded and shown to users. 🤔 |
Understood, thanks again. For what it's worth, given the earlier example, I think the least surprising outcome is to see just:
If I'm setting up a logger, especially a library I'm not that familiar with, I would like there to be minimal noise & mental overhead and not have to worry about how to hide the internal meta logs or what they mean. Just my 2c 🙏 |
I'm trying out the library and ran across this as well. Wasn't straight forward to find out how to disable the meta logger. Maybe this can be included in the quick start docs? Right now it is in the last section under "categories" - https://logtape.org/manual/categories#meta-logger Personally, I think the meta logger should be disabled by default with an option to enable it when we call configure. |
Hi,
I don't see how I'm configuring meta logger in this example I derived from the documentation.
Am I doing something wrong? Thanks.
Latest version from npm. Happy to provide more details as needed.
The text was updated successfully, but these errors were encountered: