otp icon indicating copy to clipboard operation
otp copied to clipboard

ssh: Use logger; avoid unnecessary string creation

Open IngelaAndin opened this issue 2 years ago • 3 comments

ERIERL-1010 to be included

Improve ssh application.

@KennethL @IngelaAndin - please review the work item

DoD

  1. logger used instead of error_logger
  2. if possible string processing is avoided depending on current log level (e.g. info log event content is not prepared if log level is error)
  3. plan after OTP-26 release

IngelaAndin avatar Jan 16 '23 11:01 IngelaAndin

@IngelaAndin I would like discuss priority for that task. I think issues related to DAFH-1349 are fixed. Related crashes and instabilities should be gone.

Do we want to improve ssh code? If yes, with what priority? Do we want to replace error_logger in ssh with logger and rewrite how log information is processed? Data is processed in chains of function calls ... not in a single place.

u3s avatar Feb 07 '23 11:02 u3s

Kenneth: plan after OTP26

u3s avatar Feb 07 '23 13:02 u3s

ERIERL-1041 handled by #8185 (merged, waits for patches)

u3s avatar Feb 26 '24 12:02 u3s

also use fun() as argument

u3s avatar Feb 18 '25 19:02 u3s

PR-9556 does 2 things:

  • use logger directly (remove error_logger calls)
  • be more lazy about data processing for log events

those changes are backwards compatible. I tried to generated exactly same events. I would propose including them in emergency patches

separately for master, we could consider/discuss if we want to use LOG logger macros in ssh. so that LOCATION is set for log events. I have that work partially done already. Log events content would be change due to that, but events would contain more data.

PS. I'm not sure why ERIERL-1010 is mentioned in original description it seems unrelated. @IngelaAndin do you remember?

u3s avatar Mar 07 '25 10:03 u3s

PR-9556 know removes error_logger completely from ssh. I would like to receive review comments and have some discussion.

u3s avatar Mar 12 '25 12:03 u3s