logdna-agent icon indicating copy to clipboard operation
logdna-agent copied to clipboard

LogDNA logging info at Error level for PostgreSQL

Open blaza1 opened this issue 5 years ago • 7 comments

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: image Is this expected behaviour?

blaza1 avatar Jun 17 '19 13:06 blaza1

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/

jakedipity avatar Jun 27 '19 20:06 jakedipity

Ok, thanks for your reply. I've direct messaged you.

blaza1 avatar Jul 01 '19 10:07 blaza1

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 avatar Dec 08 '19 09:12 victorbr

@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!

smusali avatar Dec 08 '19 20:12 smusali

@blaza1, we would like to know whether you are still having the same issues.

smusali avatar Dec 08 '19 20:12 smusali

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: image 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 avatar Dec 11 '19 08:12 victorbr

@victorbr thanks for posting this! It's likely related; we're investigating on our end now, and will update here as we go.

andkon avatar Dec 11 '19 15:12 andkon