Skip to content

Conversation

@lurenx
Copy link

@lurenx lurenx commented Sep 14, 2018

    connected,connecting = logger.isconnected()
    if  type(connected) ~= "nil" and type(connecting) ~= "nil"  then
        if not connected then
            create_error_response(1000,"server error")
        end
    end
    local bytes, err = logger.log(send_str)
    if err then
        ngx.log(ngx.ERR, "failed to log message: ", err)
        create_error_response(1000,"server error")
    end
    return

we can check the type and value of connected,connecting to response the client different http code if we dont want to lost log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant