Skip to content

Commit

Permalink
add documentation for to_syslog_facility_code vrl function
Browse files Browse the repository at this point in the history
  • Loading branch information
simplepad committed Jan 18, 2025
1 parent 543e609 commit e4bf7ea
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions website/cue/reference/remap/functions/to_syslog_facility_code.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package metadata

remap: functions: to_syslog_facility_code: {
category: "Convert"
description: """
Converts the `value`, a Syslog [facility keyword](\(urls.syslog_facility)), into a Syslog integer
facility code (`0` to `23`).
"""

arguments: [
{
name: "value"
description: "The Syslog facility keyword to convert."
required: true
type: ["string"]
},
]
internal_failure_reasons: [
"`value` is not a valid Syslog facility keyword.",
]
return: {
types: ["integer"]
rules: []
}

examples: [
{
title: "Coerce to Syslog facility code"
source: """
to_syslog_facility_code!("authpriv")
"""
return: 10
},
]
}

0 comments on commit e4bf7ea

Please sign in to comment.