Skip to content

Support custom LoggingTypes #2443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
clairradiant opened this issue May 24, 2025 · 1 comment
Open

Support custom LoggingTypes #2443

clairradiant opened this issue May 24, 2025 · 1 comment

Comments

@clairradiant
Copy link

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.

@clairradiant clairradiant changed the title Support custom LoggingType-s Support custom LoggingTypes May 24, 2025
@clairradiant
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant