Update README.md

This commit is contained in:
Gabi Melman
2018-07-17 15:17:31 +03:00
committed by GitHub
parent 2656a031e1
commit b96a244984

View File

@@ -135,7 +135,7 @@ void basic_logfile_example()
} }
} }
``` ```
---
#### Rotating files #### Rotating files
```c++ ```c++
#include "spdlog/sinks/rotating_file_sink.h" #include "spdlog/sinks/rotating_file_sink.h"
@@ -145,6 +145,7 @@ void rotating_example()
auto rotating_logger = spdlog::rotating_logger_mt("some_logger_name", "logs/rotating.txt", 1048576 * 5, 3); auto rotating_logger = spdlog::rotating_logger_mt("some_logger_name", "logs/rotating.txt", 1048576 * 5, 3);
} }
``` ```
---
#### Daily files #### Daily files
```c++ ```c++
@@ -156,7 +157,7 @@ void daily_example()
} }
``` ```
---
#### Asynchronous logging #### Asynchronous logging
```c++ ```c++
#include "spdlog/async.h" #include "spdlog/async.h"
@@ -175,7 +176,7 @@ void async_example()
} }
``` ```
---
#### Multi sink with different formatting per target #### Multi sink with different formatting per target
```c++ ```c++
@@ -196,7 +197,7 @@ void multi_sink_example()
logger.info("this message should not appear in the console, only in the file"); logger.info("this message should not appear in the console, only in the file");
} }
``` ```
---
#### User defined types #### User defined types
```c++ ```c++
// user defined types logging by implementing operator<< // user defined types logging by implementing operator<<
@@ -217,7 +218,7 @@ void user_defined_example()
} }
``` ```
---
#### Custom error handler #### Custom error handler
```c++ ```c++
void err_handler_example() void err_handler_example()
@@ -228,7 +229,7 @@ void err_handler_example()
} }
``` ```
---
#### syslog #### syslog
```c++ ```c++
#include "spdlog/sinks/syslog_sink.h" #include "spdlog/sinks/syslog_sink.h"
@@ -238,9 +239,8 @@ void syslog_example()
auto syslog_logger = spdlog::syslog_logger("syslog", ident, LOG_PID); auto syslog_logger = spdlog::syslog_logger("syslog", ident, LOG_PID);
syslog_logger->warn("This is warning that will end up in syslog."); syslog_logger->warn("This is warning that will end up in syslog.");
} }
``` ```
---
#### Android example #### Android example
```c++ ```c++
#incude "spdlog/sinks/android_sink.h" #incude "spdlog/sinks/android_sink.h"