Skip to content

Losing logs + lots of lines in stderr (error.log nginx) #51

@gioialorusso

Description

@gioialorusso

Hi,
We have a problem with the fluentd-logger-php class. Sometimes it goes in error (we haven't realize yet why, but we think it could be a socket connection error) and it writes in stderr a blob of things:

  1. It writes what we are trying to send to fluentd (application logs)
  2. Plus, it writes the php errors collected during the script, like notices for example (and our error level configured in php.ini file excludes the notices, so it is strange).
    Writing in stderr causes us a lot of noise in the nginx error.log, and, furthermore, we loose the application logs forever.
    The fluentd, even if is in debug mode, doesn't write anything when this problem happens.
    We experimentally caused a socket connection error modifying the library code (in development environment) and we got the problematic behaviour (wrote lines in error.log nginx). This is why we believe that this could be the problem.

Now, we want to understand some things:

  1. we would like to know precisely why this is happening and how we can detect the exact problem.
  2. we cannot have these lines of logs wrote in stderr, because in this way we cannot navigate the nginx logs to analyze them easily.
  3. we would like to not loose the log, but have something to retry the writing if something goes wrong, is this possible?

Thanks,
Gioia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions