mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Update README.md
This commit is contained in:
parent
ccffb6ecd6
commit
97fea81599
@ -56,7 +56,6 @@ $ cmake .. && make -j
|
|||||||
#### Basic usage
|
#### Basic usage
|
||||||
```c++
|
```c++
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
#include "spdlog/sinks/basic_file_sink.h"
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@ -79,10 +78,6 @@ int main()
|
|||||||
// define SPDLOG_ACTIVE_LEVEL to desired level
|
// define SPDLOG_ACTIVE_LEVEL to desired level
|
||||||
SPDLOG_TRACE("Some trace message with param {}", 42);
|
SPDLOG_TRACE("Some trace message with param {}", 42);
|
||||||
SPDLOG_DEBUG("Some debug message");
|
SPDLOG_DEBUG("Some debug message");
|
||||||
|
|
||||||
// Set the default logger to file logger
|
|
||||||
auto file_logger = spdlog::basic_logger_mt("basic_logger", "logs/basic.txt");
|
|
||||||
spdlog::set_default_logger(file_logger);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user