Skip to content

Fluentd formatter process_info method is outdated #190

Open
@leshik

Description

@leshik

Fluentd formatter process_info method is outdated and not working.

It inherits from Json, which inherits from Raw, which inherits from Base – none of them has the process_info method anymore. It only exists in Default (for backward compatibility I suppose).

Activity

reidmorrison

reidmorrison commented on Jan 17, 2022

@reidmorrison
Owner

Since you use Fluentd, can you help explain what it is trying to do in this appender. The comment indicates Ignore fields: pid, thread, file and line by default. I.e. do we want to exclude these fields from the output JSON for Fluentd by default/always?

leshik

leshik commented on Jan 18, 2022

@leshik
Author

Hi, I think yes – Fluentd is mostly used in a containerized environment where processes usually have pid = 1 and hostname is the docker container id, which makes little sense to put in logs. Not sure what was the reasoning behind ignoring the file and line, I'm not using this anyway.

henare

henare commented on Jan 16, 2025

@henare

I was confused by this too. It definitely doesn't do what it says on the tin and, after looking into fixing it, I suspect it hasn't worked for a while.

As @leshik mentioned, when using Docker, setting the container ID as the hostname isn't very useful and was one of the reasons I was looking at using this formatter. But it never excluded the host in the first place.

With options like log_host already available on the base class my vote would be to deprecate and remove this formattter to avoid confusion. Thanks to the way the formatter code is structured it's easy to write a very simple formatter of your own if you need functionality like this. That's what I plan to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @henare@reidmorrison@leshik

        Issue actions

          `Fluentd` formatter `process_info` method is outdated · Issue #190 · reidmorrison/semantic_logger