Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Add CUPS logging directives
Browse files Browse the repository at this point in the history
  • Loading branch information
leoarnold committed Apr 22, 2019
1 parent 9aec90a commit bd51646
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,12 @@ Installs, configures, and manages the CUPS service.
}
```

* `log_debug_level`: Sets the `LogDebugLevel` directive of the CUPS server.

* `log_level`: Sets the `LogLevel` directive of the CUPS server.

* `log_time_format`: Sets the `LogTimeFormat` directive of the CUPS server.

* `max_clients`: Specifies the maximum number of simultaneous clients to support.

* `max_clients_per_host`: Specifies the maximum number of simultaneous clients to support from a single address.
Expand Down
6 changes: 6 additions & 0 deletions README.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,12 @@ Installs, configures, and manages the CUPS service.
}
```

* `log_debug_level`: Sets the `LogDebugLevel` directive of the CUPS server.

* `log_level`: Sets the `LogLevel` directive of the CUPS server.

* `log_time_format`: Sets the `LogTimeFormat` directive of the CUPS server.

* `max_clients`: Specifies the maximum number of simultaneous clients to support.

* `max_clients_per_host`: Specifies the maximum number of simultaneous clients to support from a single address.
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
# Note that the `cupsd.conf` directive `Port 631` is equivalent to `Listen *:631`.
# *Warning*: For this module to work, it is *mandatory* that CUPS is listening on `localhost:631`.
# @param location Sets the access control lists for the CUPS web interface. Restricts access to localhost by default.
# @param log_debug_level Sets the `LogDebugLevel` directive of the CUPS server.
# @param log_level Sets the `LogLevel` directive of the CUPS server.
# @param log_time_format Sets the `LogTimeFormat` directive of the CUPS server.
# @param max_clients Specifies the maximum number of simultaneous clients to support.
# @param max_clients_per_host Specifies the maximum number of simultaneous clients to support from a single address.
# @param max_log_size Sets the `MaxLogSize` directive of the CUPS server.
Expand Down Expand Up @@ -67,6 +70,9 @@
Optional[String] $default_queue = undef,
Variant[String, Array[String]] $listen = ['localhost:631', '/var/run/cups/cups.sock'],
Optional[Variant[String, Hash]] $location = undef,
Optional[Integer] $log_debug_level = undef,
Optional[String] $log_level = undef,
Optional[String] $log_time_format = undef,
Optional[Integer] $max_clients = undef,
Optional[Integer] $max_clients_per_host = undef,
Optional[Variant[Integer, String]] $max_log_size = undef,
Expand Down
4 changes: 3 additions & 1 deletion templates/cupsd/_directives.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ DefaultAuthType Basic
<%= "Listen #{l}" %>
<% end -%>
<% end -%>
LogLevel warn
<%= COMMENT_OUT if @log_debug_level.nil? -%>LogDebugLevel <%= @log_debug_level %>
<%= COMMENT_OUT if @log_level.nil? -%>LogLevel <%= @log_level %>
<%= COMMENT_OUT if @log_time_format.nil? -%>LogTimeFormat <%= @log_time_format %>
<%= COMMENT_OUT if @max_clients.nil? -%>MaxClients <%= @max_clients %>
<%= COMMENT_OUT if @max_clients_per_host.nil? -%>MaxClientsPerHost <%= @max_clients_per_host %>
<%= COMMENT_OUT if @max_log_size.nil? -%>MaxLogSize <%= @max_log_size %>
Expand Down

0 comments on commit bd51646

Please sign in to comment.