Skip to content

Commit 5608bc7

Browse files
authored
Merge pull request #792 from dodevops/update-logdrivers
Remove log_driver limitations
2 parents 4ed2c8c + 791cfb1 commit 5608bc7

File tree

1 file changed

+6
-30
lines changed

1 file changed

+6
-30
lines changed

Diff for: manifests/init.pp

+6-30
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,17 @@
8484
# @param log_driver
8585
# Set the log driver.
8686
# Docker default is json-file.
87-
# Valid values: none, json-file, syslog, journald, gelf, fluentd
88-
# Valid values description:
89-
# none : Disables any logging for the container.
90-
# docker logs won't be available with this driver.
91-
# json-file: Default logging driver for Docker.
92-
# Writes JSON messages to file.
93-
# syslog : Syslog logging driver for Docker.
94-
# Writes log messages to syslog.
95-
# journald : Journald logging driver for Docker.
96-
# Writes log messages to journald.
97-
# gelf : Graylog Extended Log Format (GELF) logging driver for Docker.
98-
# Writes log messages to a GELF endpoint: Graylog or Logstash.
99-
# fluentd : Fluentd logging driver for Docker.
100-
# Writes log messages to fluentd (forward input).
101-
# splunk : Splunk logging driver for Docker.
102-
# Writes log messages to Splunk (HTTP Event Collector).
103-
# awslogs : AWS Cloudwatch Logs logging driver for Docker.
104-
# Write log messages to Cloudwatch API
87+
# Please verify the value by yourself, before setting it. Valid shipped log drivers can be found here:
88+
# https://docs.docker.com/config/containers/logging/configure/#supported-logging-drivers
89+
# Since custom log driver plugins are and must be possible, the value can not be verified through code here.
10590
#
10691
# @param log_opt
10792
# Set the log driver specific options
10893
# Valid values per log driver:
10994
# none : undef
95+
# local :
96+
# max-size=[0-9+][k|m|g]
97+
# max-file=[0-9+]
11098
# json-file:
11199
# max-size=[0-9+][k|m|g]
112100
# max-file=[0-9+]
@@ -504,18 +492,6 @@
504492
}
505493
}
506494

507-
if $log_driver {
508-
if $facts['os']['family'] == 'windows' {
509-
assert_type(Pattern[/^(none|json-file|syslog|gelf|fluentd|splunk|awslogs|etwlogs)$/], $log_driver) |$a, $b| {
510-
fail('log_driver must be one of none, json-file, syslog, gelf, fluentd, splunk, awslogs or etwlogs')
511-
}
512-
} else {
513-
assert_type(Pattern[/^(none|json-file|syslog|journald|gelf|fluentd|splunk|awslogs)$/], $log_driver) |$a, $b| {
514-
fail('log_driver must be one of none, json-file, syslog, journald, gelf, fluentd, splunk or awslogs')
515-
}
516-
}
517-
}
518-
519495
if $storage_driver {
520496
if $facts['os']['family'] == 'windows' {
521497
assert_type(Pattern[/^(windowsfilter)$/], $storage_driver) |$a, $b| {

0 commit comments

Comments
 (0)