Conversation
One call site (oc_httpc_worker). lager is unmaintained and reaches inside OTP in ways that are not supported: lager_stdlib.erl is a verbatim copy of unexported OTP stdlib functions (Copyright Ericsson AB 1996-2009) and lager_format.erl a fork of io_lib_format (1996-2011-2012); lager_app starts the deprecated error_logger, installs OTP internal error_logger module as a logger handler by hand rather than through error_logger:add_report_handler, then calls logger:remove_handler(default) to remove OTP own default handler -- its own comment calls that "a band-aid" for OTP 21; and error_logger_lager_h pattern-matches OTP internal report tuples. Upstream last commit is e6b3178 (2023-11-02), so none of that is being re-synced. The ?LOG_* macros rather than logger:Level/2 calls: the macros capture module, function and line, which is the job lager parse transform used to do. chef-server pins this library and cannot remove lager from its own services while this one still declares the dependency. Verified with rebar3 compile from a clean _build in an erlang:26 container. Signed-off-by: Tim Smith <tim@mondoo.com>
This was referenced Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One call site (
oc_httpc_worker). Removes the lager dep and its parse transform.Why
lageris unmaintained and reaches inside OTP in ways that are not supported:lager_stdlib.erlis a verbatim copy of unexported OTP stdlib functions — "Functions from Erlang OTP distribution that are really useful but aren't exported", Copyright Ericsson AB 1996-2009 — andlager_format.erlis a fork ofio_lib_format(1996-2011-2012).lager_appstarts the deprecatederror_logger, installs OTP's internalerror_loggermodule as a logger handler by hand rather than througherror_logger:add_report_handler, then callslogger:remove_handler(default)to delete OTP's own default handler. Its own comment calls this "a band-aid" for OTP 21.error_logger_lager_hpattern-matches OTP's internal{error_report,_}/{info_report,_}shapes.lager_transformrewrites the AST at compile time.Upstream's last commit is
e6b3178(2023-11-02), so none of that is being re-synced.?LOG_*macros rather thanlogger:Level/2calls: the macros capture module, function and line, which is the joblager_transformdid.Coordination
chef-serverpins this library and cannot remove lager from its own services while this one still declares the dependency. Companion PRs exist on the other two libraries it pulls lager through.Verified with
rebar3 compilefrom a clean_buildin anerlang:26container.