Update README.md
This commit is contained in:
parent
1f732585b2
commit
903bf2135d
@ -339,12 +339,11 @@ void android_example()
|
|||||||
|
|
||||||
---
|
---
|
||||||
#### Load log levels from env variable or from argv
|
#### Load log levels from env variable or from argv
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
#include "spdlog/cfg/env.h"
|
#include "spdlog/cfg/env.h"
|
||||||
int main (int argc, char *argv[])
|
int main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
// Set the log level to "info" and mylogger to to "trace":
|
|
||||||
// SPDLOG_LEVEL=info,mylogger=trace && ./example
|
|
||||||
spdlog::cfg::load_env_levels();
|
spdlog::cfg::load_env_levels();
|
||||||
// or from command line:
|
// or from command line:
|
||||||
// ./example SPDLOG_LEVEL=info,mylogger=trace
|
// ./example SPDLOG_LEVEL=info,mylogger=trace
|
||||||
@ -353,6 +352,10 @@ int main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```console
|
||||||
|
export SPDLOG_LEVEL=info,mylogger=trace && ./example
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
## Benchmarks
|
## Benchmarks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user