Skip to content

Changes

Summary

  1. sctp_server: fix state in catch-all handle_call() (details)
  2. logging: use ?LOG macros instead of calling logger:level() (details)
  3. logging: cosmetic: print mfa at the end of each line (details)
  4. logging: convert error_logger:error_report/1 to ?LOG_ERROR (details)
Commit 1e238f9f44280340b32493b216c1a37ff3eab5f0 by Vadim Yanitskiy
sctp_server: fix state in catch-all handle_call()

Sending an unexpected call breaks the server, because the third member
of a returned tuple (not_implemented) becomes the new state.  It was
actually meant to be part of the Reply - fix this.

https://www.erlang.org/doc/apps/stdlib/gen_server.html#c:handle_call/3

  {reply, Reply :: term(), NewState :: term()}

Change-Id: I1cc683e549c3bb61e3e4c45bb3d244202d61be53
The file was modified src/sctp_server.erl
Commit 109f898e2b0d871c254ea59dc79bc84bc7adc29b by Vadim Yanitskiy
logging: use ?LOG macros instead of calling logger:level()

The difference between using these macros and the exported functions
is that macros add location (originator) information to the metadata,
and perform lazy evaluation by wrapping the logger call in a case
statement, so it is only evaluated if the log level of the event
passes the primary log level check.

https://www.erlang.org/doc/apps/kernel/logger_chapter.html#logger-api

Change-Id: I3b6e4296f736f9c87d2706ef5fb75146fd9f1239
The file was modified src/s1ap_proxy.erl
The file was modified src/sctp_client.erl
The file was modified src/sctp_proxy.erl
The file was modified src/sctp_server.erl
Commit b8087e92754effbe596729fe19fad4b988e47073 by Vadim Yanitskiy
logging: cosmetic: print mfa at the end of each line

Change-Id: Ib5b8aabd1d7285d22a4cee2beece77691c61f753
The file was modified config/sys.config
Commit 563302430d140d86ef7b694af1bda37417a08077 by Vadim Yanitskiy
logging: convert error_logger:error_report/1 to ?LOG_ERROR

In Erlang/OTP 21.0, a new API for logging was added.  The old error_logger
module can still be used by legacy code, but log events are redirected to
the new Logger API.  New code should use the Logger API directly.

Change-Id: Id6c61fb5ca730209ef625fc5f63d627574e60fbe
The file was modified src/sctp_server.erl