[PATCH] D60343: [asan_symbolize] Use proper logging infrastructure.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 7 03:03:36 PDT 2019


delcypher marked an inline comment as done.
delcypher added inline comments.


================
Comment at: lib/asan/scripts/asan_symbolize.py:18
+
+  ASAN_SYMBOLIZER_LOG_LEVEL
+    Sets the log level (debug, info, warning, error, or critical).
----------------
vitalybuka wrote:
> I'd prefer we avoid env variables here
> I guess you can use 
> ```
> args, unknown_args = parser.parse_known_args()
> ```
> to parse args before pluggins just to setup logging
> and then parse them again with additional flags.
Good point. I hadn't thought of doing it that way. I'll try it.

On a related note the way I was planning on consuming the list of plug-ins to load (future patch) is via an environment variable. The reasons are the same as this patch but also because it's more convenient (e.g. I can just set the environment variable in my shells environment and avoid having to type long commands). Do you also have the same preference for command line arguments here too?


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60343/new/

https://reviews.llvm.org/D60343





More information about the llvm-commits mailing list