ida-minsc icon indicating copy to clipboard operation
ida-minsc copied to clipboard

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

Open arizvisa opened this issue 7 years ago • 1 comments

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 avatar Sep 23 '18 09:09 arizvisa

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

cryzlasm avatar Nov 29 '18 03:11 cryzlasm