Skip to content

Logging drivers enhancement  #1039

Open

Description

@fahedouch

What is the problem you're trying to solve

Target Nerdctl logging drivers:

Describe the solution you'd like

Configure logging drivers

Additional context

No response

Activity

  1. Zheaoli commented on May 10, 2022

    @Zheaoli
    Member

    Maybe I can handle the rest of the task in this issue. @fahedouch would you mind this issue to me?

  2. fahedouch commented on May 11, 2022

    @fahedouch
    MemberAuthor

    thank you for you request @Zheaoli . I start writing code for journald so let me finish it based on your refacto #1050 . You can enhance the rest of the list

  3. Zheaoli commented on May 11, 2022

    @Zheaoli
    Member

    @fahedouch Great! Maybe I can write the fluentd and syslog first. BTW, maybe we need spilt the logger in two parts: the readable logger and the unreadable logger

  4. fahedouch commented on May 11, 2022

    @fahedouch
    MemberAuthor

    @Zheaoli What do you mean by readable logger and the unreadable logger here ?

  5. Zheaoli commented on May 11, 2022

    @Zheaoli
    Member

    Yes, because some of the loggers such as fluentd can not read the log directly after we wrote the log. So I think maybe we need to split the logger by two types

  6. AkihiroSuda commented on May 11, 2022

    @AkihiroSuda
    Member

    Probably we should support using multiple drivers simultaneously. Then we can read/write jsonfiles while writing to fluentd.

  7. Zheaoli commented on May 11, 2022

    @Zheaoli
    Member

    Probably we should support using multiple drivers simultaneously. Then we can read/write jsonfiles while writing to fluentd.

    SGTM.

  8. fahedouch commented on May 11, 2022

    @fahedouch
    MemberAuthor

    Probably we should support using multiple drivers simultaneously. Then we can read/write jsonfiles while writing to fluentd.

    We are creating a dependency between drivers here; json-file driver issue will impact fluentd driver from nerdctl point of view. This can be voluntary when the user configures generated jsonfiles as fluentd tail input (https://docs.fluentd.org/input/tail)

    I think we should implement fluentd driver as a separated LoggerFunc, we can implement one of the fluentd input
    using this module https://github.com/fluent/fluent-logger-golang

  9. fahedouch commented on May 19, 2022

    @fahedouch
    MemberAuthor

    @Zheaoli FYI I start working on local driver.

  10. Zheaoli commented on May 23, 2022

    @Zheaoli
    Member

    I have a question, should we make the log driver 100% compatible with Docker? Some of the drivers are easy to implement but hard to E2E tests, such as AWS Cloudwatch log driver or others. @fahedouch @AkihiroSuda

  11. fahedouch commented on May 23, 2022

    @fahedouch
    MemberAuthor

    @Zheaoli implement the above list is enough at least for the moment

  12. Zheaoli commented on May 23, 2022

    @Zheaoli
    Member

    @Zheaoli implement the above list is enough at least for the moment

    SGTM

  13. AkihiroSuda commented on May 23, 2022

    @AkihiroSuda
    Member

    I think the AWS CloudWatch driver should be implemented as a third party plugin that can be called with --log-driver binary://foo

  14. Zheaoli commented on May 23, 2022

    @Zheaoli
    Member

    I think the AWS CloudWatch driver should be implemented as a third party plugin that can be called with --log-driver binary://foo

    SGTM, I think I can make a design proposal

  15. 6 remaining items

  16. fahedouch commented on Jul 20, 2022

    @fahedouch
    MemberAuthor

    @manugupt1 Sure let me cleanup what I did and push it ASAP

  17. unpinned this issue on Aug 4, 2022
  18. Zheaoli commented on Sep 4, 2022

    @Zheaoli
    Member

    @manugupt1 is there any update about this issue?

  19. manugupt1 commented on Sep 4, 2022

    @manugupt1
    Contributor

    @manugupt1 is there any update about this issue?

    Sorry, been busy with work a lot. So, I have not made much progress

  20. manugupt1 commented on Sep 11, 2022

    @manugupt1
    Contributor

    @AkihiroSuda @fahedouch @Zheaoli Should we close this as third party support is open or keep it open for inbuilt drivers?

  21. dalvarezquiroga commented on Nov 24, 2022

    @dalvarezquiroga

    Yeah would be great to read the logs using directly nerdctl :-)

    nerdctl -n k8s.io container logs e780b0e8aba7
    WARN[0000] Currently, nerdctl logs only supports containers created with nerdctl run -d
    FATAL[0000] open /var/lib/nerdctl/1935db59/containers/e780b0e8aba78200dfe6112dc834925952ee6bb3a39f64cb8ab88081c77c74f9/log-config.json: no such file or directory

  22. anonymousr007 commented on Aug 7, 2023

    @anonymousr007

    Hello Everyone,

    I am Rishabh, an undergraduate computer engineering student. I am interested in this issue. Is it still open?

    Best Regards
    Rishabh Singh

  23. fahedouch commented on Aug 7, 2023

    @fahedouch
    MemberAuthor

    Hello Everyone,

    I am Rishabh, an undergraduate computer engineering student. I am interested in this issue. Is it still open?

    Best Regards Rishabh Singh

    Hi Rishabh,
    Yes, please go ahead. What lnterest you in this ticket ?

  24. anonymousr007 commented on Aug 8, 2023

    @anonymousr007

    Hello Everyone,
    I am Rishabh, an undergraduate computer engineering student. I am interested in this issue. Is it still open?
    Best Regards Rishabh Singh

    Hi Rishabh, Yes, please go ahead. What lnterest you in this ticket ?

    • local
    • fluentbit
    • syslog

    I guess, These three logging drivers are not implemented yet.

  25. austinvazquez commented on Nov 2, 2023

    @austinvazquez
    Member

    Hi @fahedouch, can this ticket also include adding support for "none" logging driver?

    The use case is to be able to disable container logs from compose file.

    e.g. nerdctl compose up of docker-compose.yml

    version: "3.7"
    
    services:
      compute:
        image: public.ecr.aws/ubuntu/ubuntu:22.04
        logging:
          driver: "none"
    

    results in:

    INFO[0000] Ensuring image public.ecr.aws/ubuntu/ubuntu:22.04
    INFO[0000] Re-creating container repro-compute-1
    FATA[0000] unknown logging driver "none": not found
    FATA[0000] error while creating container repro-compute-1: exit status 1
    

    References:
    [1] https://docs.docker.com/config/containers/logging/configure/#supported-logging-drivers

  26. vsiravar commented on Nov 26, 2023

    @vsiravar
    Contributor

    @fahedouch are you working on the local log driver? Do you have a draft for the design for inspiration :). I can help with the implementation.

  27. fahedouch commented on Nov 29, 2023

    @fahedouch
    MemberAuthor

    @vsiravar unfortunately I didn't have enough time to make a clear enough design. The idea is to separate the local driver into a different binary then consume it using containerd runtime v2 logging plugin mode.

    "binary://BIN?KEY=VALUE" URI is parsed into Args {BIN, KEY, VALUE}.
    
  28. aadarsh-mohta commented on Aug 5, 2025

    @aadarsh-mohta

    Hi guys. We are using containerd in our environment with log driver as journald. We are seeing one issue where with containerd restart a lot of our containers which are being run via nerdctl are restarting. In logs we see the following:
    containerd[2742376]: time="2025-08-05T06:15:39.403104794Z" level=warning msg="failed to send SIGTERM signal, killing logging shim" error="os: process already finished" containerd[2742376]: time="2025-08-05T06:15:39.416547484Z" level=info msg="shim disconnected" id=7467fa1e6911584a37b3984561742e10bafaadb628e2a4f69ed630beddc567fe containerd[2742376]: time="2025-08-05T06:15:39.416834544Z" level=warning msg="cleaning up after shim disconnected" id=7467fa1e6911584a37b3984561742e10bafaadb628e2a4f69ed630beddc567fe namespace=default containerd[2742376]: time="2025-08-05T06:15:39.416945776Z" level=info msg="cleaning up dead shim"

    Can someone suggest as to if this is expected. Ideally I would not want containers to restart with restart of containerd. What can I do to avoid the same ?
    @fahedouch

  29. ningmingxiao commented on Aug 19, 2025

    @ningmingxiao
    Contributor

    //assign me @aadarsh-mohta I will fix it later.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions