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.

Why is the default logger overridden?

See original GitHub issue

https://github.com/cocotb/cocotb/blob/ba0fb097efbd2939ad6a961ee8d02793104ef8f7/cocotb/__init__.py#L60

How about instead of forcing users to use the cocotb logger through logging, we just extend cocotb.log to act more like the logging module and get users to use that instead?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
eric-wiesercommented, Dec 4, 2019

would first try to load a user’s custom logger module

I think we just leave this to the python logging infrastructure.

I’d like to see this pattern be applied to the embed_gpi/cocotb module entry point as well, so we could overload the entire (or at least part) of the setup to support launching into IPython.

Filed #1225 for that to keep discussion here focused

Maybe some documentation on required interfaces.

Once #1213 is in, the answer will basically be “there is no cocotb logging interface, just configure the python logging module as you see fit”.

1reaction
ktbarrettcommented, Dec 4, 2019

We need the ability to inject a Logger class before the cocotb, gpi, scheduler, and regression loggers are constructed, or there will be inconsistent logging behavior, no? Currently no user code is run until the user’s test module is loaded.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default logging level (root logger) is overridden #9989 - GitHub
Root logging level configuration is overridden by pytest and does not allow to use its level restrictions. Detailed description. Have mentioned ...
Read more >
Django unnamed default logger is overridden by imported ...
So you can see Im using the unnamed logger '' and the root logger, which should set the default logging level to WARN....
Read more >
Override Signal Logging Settings - MATLAB & Simulink
If you close and then reopen the model, the logging setting overrides that you made are in effect, if logging mode is set...
Read more >
Override default console logger - SAP Community
Hello, I'm trying to override default Hybris logger that is writing to console. I tried to modify rootLogger to use my custom appenders, ......
Read more >
How to override default logging.yml file with custom logging ...
You can customize logging configuration by creating your own version of logging.yml with custom settings, by either creating the file at the default...
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