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

Feature: Implement module-specific logging for all of the modules #2

Open
arizvisa opened this issue Sep 23, 2018 · 1 comment
Open

Comments

@arizvisa
Copy link
Owner

arizvisa commented Sep 23, 2018

Right now ida-minsc explicitly uses logging.root to log error messages and status. Due to it explicitly modifying the root logger, this means it doesn't really play nice with people who customize their logging. This originated mostly due to my laziness, and just kind of stuck since it's already a ton of labor to emit all of a function's arguments manually.

The proper way to do this would be to use the root logger to create the initial logger, and then for each module create a sub-logger with the module name. Specifically one would create the root logger for the plugin in __root__.py, stash it somewhere (like maybe in _exceptions.py or something), and then fetch a sub-logger at the beginning of each module.

This would allow a user to customize where (and how) logs are emitted. As an example, like if they want to output them directly to a file such as when using IDA to batch-process a bunch of binaries instead of using IDA's output log parameter ("-L") to capture them.

@arizvisa arizvisa changed the title Feature: Implement custom logging for all of the modules Feature: Implement module-specific logging for all of the modules Sep 23, 2018
@cryzlasm
Copy link

logger.propagate=False # Prohibited to pass to the root Log record

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

No branches or pull requests

2 participants