pagerduty.severityFromLevel() function

    Function definition

    1. import "strings"
    2. severityFromLevel = (level) => {
    3. sev = if lvl == "warn" then "warning"
    4. else if lvl == "crit" then "critical"
    5. else if lvl == "ok" then "info"
    6. else "error"
    7. }