SIGN IN SIGN UP

Add config option for log level (#2391)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/2391

Add a buck config option to set the ExecuTorch log level. Used as follows:

`buck2 run ... -c executorch.log_level=[level]`

Where [level] is one of Debug, Info, Error, or Fatal (case-in-sensitive).

Log methods are refactored into a separate bazel file to facilitate re-use. I need to override the XNNPACK log level when ET log level is set to Debug, and I don't want to duplicate the log level parsing logic.

bypass-github-export-checks
bypass-github-executorch-ci-checks

Reviewed By: digantdesai

Differential Revision: D54800053

fbshipit-source-id: f66e8524343d594c099cc864e6ad4d675ae19a3c
G
Gregory Comer committed
624ce59a0c6ba22933615d2c9a49a28a3defd9e2
Parent: d42d21b
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 3/13/2024, 6:14:04 PM