@@ -54,8 +54,8 @@ We review PRs and issues at least once a month as described below.
5454OTP Support Policy
5555------------------
5656The lager maintainers intend to support the past three OTP releases from
57- current on the main 3.x branch of the project. As of July 2017 that includes
58- 20, 19, and 18.
57+ current on the main 3.x branch of the project. As of December 2018 that includes
58+ 21, 20, 19.
5959
6060Lager may or may not run on older OTP releases but it will only be guaranteed
6161tested on the previous three OTP releases. If you need a version of lager
@@ -294,6 +294,14 @@ the lager application variable `error_logger_redirect` to `false`.
294294You can also disable reformatting for OTP and Cowboy messages by setting variable
295295` error_logger_format_raw ` to ` true ` .
296296
297+ If you installed your own handler(s) into ` error_logger ` , you can tell
298+ lager to leave it alone by using the ` error_logger_whitelist ` environment
299+ variable with a list of handlers to allow.
300+
301+ ```
302+ {error_logger_whitelist, [my_handler]}
303+ ```
304+
297305The ` error_logger ` handler will also log more complete error messages (protected
298306with use of ` trunc_io ` ) to a "crash log" which can be referred to for further
299307information. The location of the crash log can be specified by the ` crash_log `
@@ -593,6 +601,7 @@ on your favorite search engine is a good starting point.
593601
594602Exception Pretty Printing
595603----------------------
604+ Up to OTP 20:
596605
597606``` erlang
598607try
@@ -605,6 +614,19 @@ catch
605614end .
606615```
607616
617+ On OTP 21+:
618+
619+ ``` erlang
620+ try
621+ foo ()
622+ catch
623+ Class :Reason :Stacktrace ->
624+ lager :error (
625+ " ~n Stacktrace:~s " ,
626+ [lager :pr_stacktrace (Stacktrace ), {Class , Reason }])
627+ end .
628+ ```
629+
608630Record Pretty Printing
609631----------------------
610632Lager's parse transform will keep track of any record definitions it encounters
@@ -935,8 +957,6 @@ will be impacted by what the functions you call do and how much latency they
935957may introduce. This impact will even greater with ` on_log ` since the calls
936958are injected at the point a message is logged.
937959
938-
939-
940960Setting the truncation limit at compile-time
941961--------------------------------------------
942962Lager defaults to truncating messages at 4096 bytes, you can alter this by
@@ -1121,6 +1141,7 @@ Example Usage:
112111413.x Changelog
11221142-------------
112311433.6.7 - 14 October 2018
1144+
11241145 * Bugfix: fix tracing to work with OTP21 #480
11251146
112611473.6.6 - 24 September 2018
0 commit comments