logdna-agent
logdna-agent copied to clipboard
LogDNA logging info at Error level for PostgreSQL
The docs seems to suggest that postgresql logging is supported by logdna https://docs.logdna.com/docs/ingestion#section-supported-types However the info level message: LOG: incomplete startup packet gets filtered gets marked at Error level:
Is this expected behaviour?
It's possible that your log is being wrapped by something like syslog or kubernetes and that's where we are deriving the level from. It's also possible that there's an error with our postgresql format. It's hard to say with out more context. Can you send me a direct message on our public slack channel with a link to the offending line?
https://logdna-public.slack.com/messages/D8Y0ZEFS7/
Ok, thanks for your reply. I've direct messaged you.
It appears LogDNA classifies any message containing the word "error" as a message at ERROR
log level. Is this intentional? Can this be turned off? We had to rephrase some of our own messages to use "problem" instead of "error" just because of this but not every message is under our control...
@victorbr, thanks for bringing this up!
It is hard to say without any example and other info whether it is intentional or a bug. We do have parsing for PostgreSQL
logs and can you please open a ticket containing information about which tool you are using to get the logs? We could better assist you and clarify the situation if we have more info.
Thanks a lot in advance!
@blaza1, we would like to know whether you are still having the same issues.
It looks it's enough to issue log.info("error")
- it doesn't matter what source the line comes from.
For example - the code looks like this:
} catch (Exception e) {
logger.warn("Failed to initialize SAML client " + indirectClient.getName(), e);
}
And this results in the following output in LogDNA:
The only reason the line "Error getting idp Metadata resource" is marked as "Error" is because it contains the word "Error".
P.S. If you think it's separate issue, please let me know - we could open a new one.
@victorbr thanks for posting this! It's likely related; we're investigating on our end now, and will update here as we go.