Logging level of "SSL: Socket error"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Logging level of "SSL: Socket error"

Roger Lipscombe-2
The report changed from 'error_logger:info_report' in OTP-20.x to
'error_logger:error_report' in OTP-21.x (and then to ?LOG_ERROR in
master).

This now results in a lot of noise in our error reporting, because we
get "SSL: Socket error: etimedout #012" about 10 times a minute.

Any chance this change could be reverted, please?

Related: http://erlang.org/pipermail/erlang-questions/2016-December/091046.html

Thanks,
Roger.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Logging level of "SSL: Socket error"

Ingela Andin
Hi Roger!

git branch

* (HEAD detached at OTP-21.0.2)


git blame -L 2742,2749 ssl_connection.erl 


fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2742) log_alert(true, Role, ProtocolName, StateName, #alert{role = Role} = Alert) ->

fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2743)     Txt = ssl_alert:own_alert_txt(Alert),

fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2744)     error_logger:info_report(io_lib:format("~s ~p: In state ~p ~s\n", [ProtocolName, Role, StateName, Txt]));

fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2745) log_alert(true, Role, ProtocolName, StateName, Alert) ->

6c8a0271f75 (Ingela Anderton Andin 2016-08-12 12:17:47 +0200 2746)     Txt = ssl_alert:alert_txt(Alert),

fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2747)     error_logger:info_report(io_lib:format("~s ~p: In state ~p ~s\n", [ProtocolName, Role, StateName, Txt]));

fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2748) log_alert(false, _, _, _, _) ->

6c8a0271f75 (Ingela Anderton Andin 2016-08-12 12:17:47 +0200 2749)     ok.


So this was not changed in the ssl application for OTP-21.  

In the master branch, we have started to use logger and the plan is that log_alert true will be same as setting log level notice that is the default log level. We have also added a debug level and possibility to set the level.


Maybe there is something unforeseen in logger or logger/lager interaction?


Regards Ingela Erlang/OTP team- Ericsson AB 


2018-07-11 16:33 GMT+02:00 Roger Lipscombe <[hidden email]>:
The report changed from 'error_logger:info_report' in OTP-20.x to
'error_logger:error_report' in OTP-21.x (and then to ?LOG_ERROR in
master).

This now results in a lot of noise in our error reporting, because we
get "SSL: Socket error: etimedout #012" about 10 times a minute.

Any chance this change could be reverted, please?

Related: http://erlang.org/pipermail/erlang-questions/2016-December/091046.html

Thanks,
Roger.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Logging level of "SSL: Socket error"

Roger Lipscombe-2
https://github.com/erlang/otp/blob/OTP-21.0/lib/ssl/src/ssl_connection.erl#L1341-L1342

    Report = io_lib:format("SSL: Socket error: ~p ~n", [Reason]),
    error_logger:error_report(Report),



On 11 July 2018 at 17:48, Ingela Andin <[hidden email]> wrote:

> Hi Roger!
>
> git branch
>
> * (HEAD detached at OTP-21.0.2)
>
>
> git blame -L 2742,2749 ssl_connection.erl
>
>
> fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2742)
> log_alert(true, Role, ProtocolName, StateName, #alert{role = Role} = Alert)
> ->
>
> fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2743)     Txt =
> ssl_alert:own_alert_txt(Alert),
>
> fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2744)
> error_logger:info_report(io_lib:format("~s ~p: In state ~p ~s\n",
> [ProtocolName, Role, StateName, Txt]));
>
> fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2745)
> log_alert(true, Role, ProtocolName, StateName, Alert) ->
>
> 6c8a0271f75 (Ingela Anderton Andin 2016-08-12 12:17:47 +0200 2746)     Txt =
> ssl_alert:alert_txt(Alert),
>
> fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2747)
> error_logger:info_report(io_lib:format("~s ~p: In state ~p ~s\n",
> [ProtocolName, Role, StateName, Txt]));
>
> fbbf7a98975 (Ingela Anderton Andin 2017-08-31 18:31:06 +0200 2748)
> log_alert(false, _, _, _, _) ->
>
> 6c8a0271f75 (Ingela Anderton Andin 2016-08-12 12:17:47 +0200 2749)     ok.
>
>
> So this was not changed in the ssl application for OTP-21.
>
> In the master branch, we have started to use logger and the plan is that
> log_alert true will be same as setting log level notice that is the default
> log level. We have also added a debug level and possibility to set the
> level.
>
>
> Maybe there is something unforeseen in logger or logger/lager interaction?
>
>
> Regards Ingela Erlang/OTP team- Ericsson AB
>
>
> 2018-07-11 16:33 GMT+02:00 Roger Lipscombe <[hidden email]>:
>>
>> The report changed from 'error_logger:info_report' in OTP-20.x to
>> 'error_logger:error_report' in OTP-21.x (and then to ?LOG_ERROR in
>> master).
>>
>> This now results in a lot of noise in our error reporting, because we
>> get "SSL: Socket error: etimedout #012" about 10 times a minute.
>>
>> Any chance this change could be reverted, please?
>>
>> Related:
>> http://erlang.org/pipermail/erlang-questions/2016-December/091046.html
>>
>> Thanks,
>> Roger.
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Logging level of "SSL: Socket error"

Roger Lipscombe-2
Hi Ingela,

On 11 July 2018 at 18:27, Roger Lipscombe <[hidden email]> wrote:
> https://github.com/erlang/otp/blob/OTP-21.0/lib/ssl/src/ssl_connection.erl#L1341-L1342
>
>     Report = io_lib:format("SSL: Socket error: ~p ~n", [Reason]),
>     error_logger:error_report(Report),
>

(pressed send too quickly...)

vs.

https://github.com/erlang/otp/blob/OTP-20.3.2/lib/ssl/src/ssl_connection.erl#L1117-L1118

    Report = io_lib:format("SSL: Socket error: ~p ~n", [Reason]),
    error_logger:info_report(Report),

It changed in https://github.com/erlang/otp/commit/6e28a7909c665cc316d657dda02a2b8655ecc5da,
but it's unclear whether it was deliberate or not.

Thanks,
Roger.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Logging level of "SSL: Socket error"

Ingela Andin
Hi Roger!

I see, those error loggings are not affected by the log_alert option as they are distribution logs and not TLS alert protocol logs. I agree the change might be accidental. We will have to review this.

Regards Ingela Erlang/OTP team - Ericsson AB

2018-07-11 19:31 GMT+02:00 Roger Lipscombe <[hidden email]>:
Hi Ingela,

On 11 July 2018 at 18:27, Roger Lipscombe <[hidden email]> wrote:
> https://github.com/erlang/otp/blob/OTP-21.0/lib/ssl/src/ssl_connection.erl#L1341-L1342
>
>     Report = io_lib:format("SSL: Socket error: ~p ~n", [Reason]),
>     error_logger:error_report(Report),
>

(pressed send too quickly...)

vs.

https://github.com/erlang/otp/blob/OTP-20.3.2/lib/ssl/src/ssl_connection.erl#L1117-L1118

    Report = io_lib:format("SSL: Socket error: ~p ~n", [Reason]),
    error_logger:info_report(Report),

It changed in https://github.com/erlang/otp/commit/6e28a7909c665cc316d657dda02a2b8655ecc5da,
but it's unclear whether it was deliberate or not.

Thanks,
Roger.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions