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

How to disable startup log? #542

Open
slashmili opened this issue Nov 28, 2022 · 3 comments
Open

How to disable startup log? #542

slashmili opened this issue Nov 28, 2022 · 3 comments

Comments

@slashmili
Copy link

slashmili commented Nov 28, 2022

Hi, I'm trying to find a way to disable the log that prints out on the producer start up

11:52:26.237 [notice]     :supervisor: {:local, :brod_sup}
    :started: [
  pid: #PID<0.369.0>,
  id: :my_producer,
  mfargs: {:brod_client, :start_link,
   [
     [localhost: 9092],
     :my_producer,
     [endpoints: [localhost: 9092], auto_start_producers: true]
   ]},
  restart_type: {:permanent, 10},
  shutdown: 5000,
  child_type: :worker
]

Do you know where does it happen? Went through all codes but couldn't find which module is emitting that.

The reason I don't disable notice log is because I still want to get info logs.

This startup log was not an issue so far. However since I moved to OTP 25 and using :public_key.cacerts_get() as in

             ssl_options: [
                verify: :verify_peer,
                cacerts: :public_key.cacerts_get(),
                customize_hostname_check: [
                  match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
                ]
              ]

I see 160 lines of logs in my logs

Update:

Seems like it's from supervisor3.

As supervisor3 is mainly used by brod, would you mind if we change supervisor3?

To either not log the progress or log it with debug severity

@zmstone
Copy link
Contributor

zmstone commented Dec 5, 2022

Hi @slashmili
I'm OK changing the logs to debug level (and maybe call logger module directly).
PR is welcome.

@zmstone
Copy link
Contributor

zmstone commented Dec 5, 2022

BTW, have you tried this logger filter: https://www.erlang.org/doc/man/logger_filters.html#progress-2

@JamieMaclean
Copy link
Contributor

+1 on this solution. We have a similar issue where we have to pass password in our ssl options, which means we are logging our password in plain text. Downgrading to debug would solve this for us. I created the PR linked above in the supervisor3 repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants