Skip to content

help request: [file-logger] duplicate log, new log file contains history log message #7902

Answered by monkeyDluffy6017
kizy008 asked this question in Q&A
Discussion options

You must be logged in to vote

You could use ngx.shared.dict to notify other processes.
For example

-- process 1
local rotate = ngx.shared.rotate
rotate:set("reopen", true)
-- process 2
local rotate = ngx.shared.rotate
local reopen = rotate:get("reopen")
if reopen then
    -- reopen file
end

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@kizy008
Comment options

@kizy008
Comment options

@kizy008
Comment options

@kizy008
Comment options

@kizy008
Comment options

Answer selected by kizy008
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #7899 on September 13, 2022 04:00.