e1ijah1 commented on code in PR #8681:
URL: https://github.com/apache/apisix/pull/8681#discussion_r1070574570


##########
apisix/plugins/file-logger.lua:
##########
@@ -136,6 +138,20 @@ local function write_file_data(conf, log_message)
             core.log.error("failed to write file: ", conf.path, ", error info: 
", err)
         end
 
+        if conf.log_to_std then
+            local std_out, err = io_open(std_out_file, "w")

Review Comment:
   Before opening the file, we must check whether log to stdout is enabled. I 
am concerned that moving the file open logic above will complicate error 
handling.



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to