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.

Log file shows packages logs and only current app logs

See original GitHub issue

In my app I create a logger using:


def create_logger(log_path, log_name, log_level=logging.INFO):
    daiquiri.setup(
        level=log_level,
        outputs=(daiquiri.output.File(
            directory=log_path, program_name=log_name), 
            daiquiri.output.STDOUT,))

    return daiquiri.getLogger(program_name=log_name)

When I look at the console, I see logs for my app and also for all the packages that I use in my app, before when I used the default logger I didn’t see those messages.

Can I turn it off, so that in my log I will only see my app logs?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shlomiLancommented, Aug 17, 2017

Thanks

0reactions
shlomiLancommented, Aug 18, 2017

The only way I have managed to change the logger log level is with: daiquiri.getLogger(program_name=log_name).logger.level = log_level

Read more comments on GitHub >

github_iconTop Results From Across the Web

Log file reference - Configuration Manager - Microsoft Learn
A reference of all log files for Configuration Manager client, server, and dependent components.
Read more >
Write and view logs with Logcat - Android Developers
View your app logs; Write log messages; Logcat message format ... The Run window displays log messages for the current running app.
Read more >
Chapter 23. Viewing and Managing Log Files
Log files produced by journald are by default not persistent, log files are stored only in memory or a small ring-buffer in the...
Read more >
26. Logging - Spring
Spring Boot uses Commons Logging for all internal logging but leaves the underlying log implementation open. Default configurations are provided for Java ...
Read more >
Spring Boot - no log file written (logging.file is not respected)
However, I created the file manually in the directory where I start the application, but nothing is written to it. I also used...
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