Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERL-913: Bug in Logger Documentation #3707

Closed
OTP-Maintainer opened this issue Apr 16, 2019 · 1 comment
Closed

ERL-913: Bug in Logger Documentation #3707

OTP-Maintainer opened this issue Apr 16, 2019 · 1 comment
Labels
not a bug Issue is determined as not a bug by OTP priority:medium

Comments

@OTP-Maintainer
Copy link

Original reporter: ad-pro
Affected version: OTP-21.0
Component: edoc
Migrated from: https://bugs.erlang.org/browse/ERL-913


2

According to erlang documentation it is possibe to configure logger for file only:

from Erlang Documentation:
[http://erlang.org/doc/apps/kernel/logger_chapter.html#logger_parameter]
{quote}
Modify the default handler to print to a file instead of standard_io:

[\{kernel,
[\{logger,
  [\{handler, default, logger_std_h,  % \{handler, HandlerId, Module,Config}
    #\{config => #\{file => "log/erlang.log"}}}
]}]}].
{quote}


  1.  In case of a wrong parameter, Logger just do not create file.

    Looks like documentation is incomplete

   {quote} \[\{kernel, \[\{logger, \[\{handler, default, logger_std_h, % \{handler, HandlerId, Module,Config} #\{config => #\{file => "log/erlang.log"}}} ]}]}].

    \{config => #\{file => "log/erlang.log"}}
{quote}

should be changed to:

{quote}#\{config => #\{ type => \{file => "log/erlang.log"}}}}

 [\{kernel,
 [\{logger,
  [\{handler, default, logger_std_h,  % \{handler, HandlerId, Module,Config}
   #\{config => #\{ type => \{file => "log/erlang.log"}}}}
]}]}].
{quote}

@OTP-Maintainer
Copy link
Author

siri said:

Hi, I think you are looking at the documentation for OTP-21.3, but using an earlier version of the code. Is that correct?

@OTP-Maintainer OTP-Maintainer added not a bug Issue is determined as not a bug by OTP priority:medium labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Issue is determined as not a bug by OTP priority:medium
Projects
None yet
Development

No branches or pull requests

1 participant