logging: add a LogConfig class and parsing code
Summary:
Add a new LogConfig class to represent the current configuration state of the
LoggerDB. This also includes code to parse config strings in both JSON and a
simpler more human-writable format (intended primarily for use in command line
arguments).
I generally expect the human-writable format to be used mainly to configure log
levels. It also supports configuring log handler details as well, but the
format for this data is slightly more cumbersome and will probably be harder
for people to easily remember.
The parsing code is intentionally kept as part of the 'init' library rather
than the core 'logging' library so that other libraries that simply wish to log
messages do not need to depend on it. For instance, this would allow the folly
JSON library to use the logging library without causing a circular dependency.
Reviewed By: bolinfest
Differential Revision:
D6200560
fbshipit-source-id:
e4e3c7f941808251b6c7bcbbdac0210118675fb0