-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
noc/uninitialized_value_concatenation #97
noc/uninitialized_value_concatenation #97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description is too short. You can use this format:
# Description
This is a summary of the changes. This should describe why do we need this change.
Whys and Hows come here.
# Cards
* https://clickup.com/12345
* https://clickup.com/12346
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description is too short. You can use this format:
# Description
This is a summary of the changes. This should describe why do we need this change.
Whys and Hows come here.
# Cards
* https://clickup.com/12345
* https://clickup.com/12346
@@ -51,7 +51,7 @@ sub open_connection { | |||
my ($c) = @_; | |||
|
|||
my $log = $c->app->log; | |||
$log->debug("accepting a websocket connection from " . $c->tx->remote_address); | |||
$log->debug("accepting a websocket connection from " . ($c->tx->remote_address // 'undefined remote address')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use debugf here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, replaced with debugf
… which is used in all tests
… which is used in all tests
$log->debug("accepting a websocket connection from " . $c->tx->remote_address); | ||
my $log = $c->app->log; | ||
my $remote_address = $c->tx->remote_address // 'undef'; | ||
$log->debug('accepting a websocket connection from ' . $remote_address); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log::any format log can handle undef
$log->debug('accepting a websocket connection from ' . $remote_address); | |
$log->debugf('accepting a websocket connection from %s', $c->tx->remote_address); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Introduced Log::Any
@denissafiullin-deriv please add changes file |
Currently
$log->debug
produces a warning due to the uninitialised value of$c->tx->remote_address
. During the last month, there were 277 warn logs out of 1.04 million connections, which is 0.027 %. To solve the issue, the following steps were taken:Log::Any
instead ofMojo::Log
to be able to usedebugf
instead ofdebug
and to follow the Perl Style Guide.undef
ifremote_address
wasn't resolved.ClickUp card: https://app.clickup.com/t/20696747/PLA-768