chewbranca commented on code in PR #4483:
URL: https://github.com/apache/couchdb/pull/4483#discussion_r1175823748


##########
src/couch_log/src/couch_log_writer_syslog.erl:
##########
@@ -55,28 +57,44 @@ init() ->
                         undefined
                 end
         end,
-
+    Level = list_to_atom(config:get("log", "syslog_report_level", "info")),
     {ok, #st{
         socket = Socket,
         host = Host,
         port = config:get_integer("log", "syslog_port", 514),
         hostname = net_adm:localhost(),
         os_pid = os:getpid(),
         appid = config:get("log", "syslog_appid", "couchdb"),
-        facility = get_facility(config:get("log", "syslog_facility", "local2"))
+        facility = get_facility(config:get("log", "syslog_facility", 
"local2")),
+        report_level = Level,
+        enterprise_number = config:get("log", "syslog_enterprise_number")
     }}.
 
 terminate(_Reason, St) ->
     gen_udp:close(St#st.socket).
 
-write(Entry, St) ->
+write(#log_entry{level = report} = Entry, #st{enterprise_number = undefined} = 
St) ->
+    do_write(Entry#log_entry{level = error}, St);

Review Comment:
   Well we need to change the level value to a syslog appropriate entry, but 
good catch, we should definitely see this to the configured `report_level` 👍 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to