question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQUEST] Changing loglevel during runtime.

See original GitHub issue

Is there any way to dynamically change loglevel during runtime? Like in pino using logger.level.

https://github.com/pinojs/pino/blob/master/docs/api.md#loggerlevel-string-gettersetter

It will be very useful in my case, when I want to change loglevel in working microservice without its reloading. Now I set it with .env and there is no way to change it dynamicly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iamoleggacommented, Aug 29, 2021

Just released 2.2.0 with this feature. Docs

1reaction
DimosthenisKcommented, Apr 6, 2021

Now that logger is accesible you can do logger.logger.level = level;

good idea, but need to check if this is root pino instance and not child logger of it

Not sure about that, but it definitely works. I just tested it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change the log level at runtime in Fastify - Backend Cafe
Changing the log level at runtime​​ You may want to change the log level at runtime by updating the request. log ! In...
Read more >
Changing the Logging Level at the Runtime for a Spring Boot ...
In this tutorial, we're going to look at ways we can change the logging level of a Spring Boot application at runtime. As...
Read more >
Dynamically changing log level without restarting the application
fileConfig is a mechanism to configure the log level for you based on a file; you can dynamically change it at any time...
Read more >
FLIP-210: Change logging level dynamically at runtime
Request Payload Example: Set the level of the logger "org.apache.flink.runtime" to DEBUG . ... Or reset the level to its original one. request....
Read more >
Zabbix 2.4 features, part 6 – Runtime loglevel changing
Currently only the ability to increase or decrease the log level has been introduced – at this time there is no way to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found