From 81dfa06cd5abe838e9b9b3013e4af67f93cc409f Mon Sep 17 00:00:00 2001
From: Joseph Palermo <joseph.palermo@broadcom.com>
Date: Tue, 1 Oct 2024 15:40:34 -0700
Subject: [PATCH] systemd does not support the same log level strings as
 bosh-dns

Use a mapping so systemd does not throw an error
---
 jobs/bosh-dns/templates/bosh_dns_ctl.erb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jobs/bosh-dns/templates/bosh_dns_ctl.erb b/jobs/bosh-dns/templates/bosh_dns_ctl.erb
index 7e0d273b6..8899e6e68 100644
--- a/jobs/bosh-dns/templates/bosh_dns_ctl.erb
+++ b/jobs/bosh-dns/templates/bosh_dns_ctl.erb
@@ -57,7 +57,7 @@ function create_network_interface() {
     ip addr add <%= p('address') %>/32 dev bosh-dns
     ip link set bosh-dns up
     resolvectl dns bosh-dns <%= p('address') %>
-    resolvectl log-level <%= p('log_level')%>
+    resolvectl log-level <%= {'DEBUG' => 'debug', 'INFO' => 'info', 'WARN' => 'warning', 'ERROR' => 'err', 'NONE' => 'emerg'}[p('log_level')] %>
   fi
 }