Skip to content

Commit

Permalink
Use datatype Icinga::LogLevel from module icinga
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Dec 22, 2023
1 parent 1327bd9 commit 6db96df
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 42 deletions.
13 changes: 3 additions & 10 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ For more information, see lib/puppet_x/icinga2/utils.rb.
* [`Icinga2::IdoCleanup`](#Icinga2--IdoCleanup): A type for the structure of settings to cleanup IDO databases
* [`Icinga2::Interval`](#Icinga2--Interval): A strict type for intervals
* [`Icinga2::LogFacility`](#Icinga2--LogFacility): A strict type of syslog facilities
* [`Icinga2::LogSeverity`](#Icinga2--LogSeverity): A strict type for log levels

## Classes

Expand Down Expand Up @@ -2362,7 +2361,7 @@ Default value: `present`

##### <a name="-icinga2--feature--mainlog--severity"></a>`severity`

Data type: `Icinga2::LogSeverity`
Data type: `Icinga::LogLevel`

You can set the log severity to 'information', 'notice', 'warning' or 'debug'.

Expand Down Expand Up @@ -2607,7 +2606,7 @@ Default value: `present`

##### <a name="-icinga2--feature--syslog--severity"></a>`severity`

Data type: `Icinga2::LogSeverity`
Data type: `Icinga::LogLevel`

You can choose the log severity between information, notice, warning or debug.

Expand Down Expand Up @@ -2643,7 +2642,7 @@ Default value: `present`

##### <a name="-icinga2--feature--windowseventlog--severity"></a>`severity`

Data type: `Icinga2::LogSeverity`
Data type: `Icinga::LogLevel`

You can choose the log severity between information, notice, warning or debug.

Expand Down Expand Up @@ -5714,9 +5713,3 @@ Variant[Enum[
], Pattern[/^LOG_LOCAL[0-7]$/]]
```

### <a name="Icinga2--LogSeverity"></a>`Icinga2::LogSeverity`

A strict type for log levels

Alias of `Enum['debug', 'information', 'notice', 'warning', 'critical']`

2 changes: 1 addition & 1 deletion manifests/feature/mainlog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
class icinga2::feature::mainlog (
Enum['absent', 'present'] $ensure = present,
Icinga2::LogSeverity $severity = 'information',
Icinga::LogLevel $severity = 'information',
Stdlib::Absolutepath $path = "${icinga2::globals::log_dir}/icinga2.log",
) {
if ! defined(Class['icinga2']) {
Expand Down
2 changes: 1 addition & 1 deletion manifests/feature/syslog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
class icinga2::feature::syslog (
Enum['absent', 'present'] $ensure = present,
Icinga2::LogSeverity $severity = 'warning',
Icinga::LogLevel $severity = 'warning',
Optional[Icinga2::LogFacility] $facility = undef,
) {
if ! defined(Class['icinga2']) {
Expand Down
2 changes: 1 addition & 1 deletion manifests/feature/windowseventlog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
class icinga2::feature::windowseventlog (
Enum['absent', 'present'] $ensure = present,
Icinga2::LogSeverity $severity = 'warning',
Icinga::LogLevel $severity = 'warning',
) {
if ! defined(Class['icinga2']) {
fail('You must include the icinga2 base class before using any icinga2 feature class!')
Expand Down
27 changes: 0 additions & 27 deletions spec/type_aliases/logseverity_spec.rb

This file was deleted.

2 changes: 0 additions & 2 deletions types/logseverity.pp

This file was deleted.

0 comments on commit 6db96df

Please sign in to comment.