Skip to content

Support custom LoggingTypes #2443

Open
Open

Description

@clairradiant

My use case requires the use of a custom logging driver. Due to the representation of LoggingType as an enum:

public enum LoggingType {
NONE("none"),
DEFAULT("json-file"),
LOCAL("local"),
ETWLOGS("etwlogs"),
JSON_FILE("json-file"),
SYSLOG("syslog"),
JOURNALD("journald"),
GELF("gelf"),
FLUENTD("fluentd"),
AWSLOGS("awslogs"),
DB("db"), // Synology specific driver
SPLUNK("splunk"),
GCPLOGS("gcplogs"),
LOKI("loki");

this appears not possible using docker-java. This issue previously came up in #783 but was resolved by manually adding the log driver type in question as an element of the enum, which does not solve the issue in the more general case.

Activity

  1. changed the title [-]Support custom LoggingType-s[/-] [+]Support custom LoggingTypes[/+] on May 24, 2025
  2. clairradiant commented on May 28, 2025

    @clairradiant
    Author

    In case anybody else is running into this issue, a possible workaround for now is to name your custom logging driver "db" (--alias-ing a plugin you're installing should also work?) and use LoggingType.DB since "db" isn't present in Docker installations by default.

    The other option would be to specify a default log-driver in daemon.json and not supply a LogConfig to docker-java. I've confirmed in this case that the default specified in daemon.json is used.

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

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