Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
b96a2449
Unverified
Commit
b96a2449
authored
Jul 17, 2018
by
Gabi Melman
Committed by
GitHub
Jul 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
2656a031
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
README.md
README.md
+8
-8
No files found.
README.md
View file @
b96a2449
...
@@ -135,7 +135,7 @@ void basic_logfile_example()
...
@@ -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()
...
@@ -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()
...
@@ -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()
...
@@ -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()
...
@@ -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()
...
@@ -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()
...
@@ -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()
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment