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
a0bba7f3
Commit
a0bba7f3
authored
Sep 11, 2015
by
Gabi Melman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #129 from ruslo/exit.code
Return unsuccessful exit code if error occurs
parents
004ff4cd
56795442
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
example/bench.cpp
example/bench.cpp
+4
-2
example/example.cpp
example/example.cpp
+3
-0
No files found.
example/bench.cpp
View file @
a0bba7f3
...
...
@@ -25,11 +25,12 @@
//
// bench.cpp : spdlog benchmarks
//
#include <atomic>
#include <cstdlib> // EXIT_FAILURE
#include <iostream>
#include <memory>
#include <string>
#include <thread>
#include <atomic>
#include "spdlog/spdlog.h"
#include "spdlog/async_logger.h"
#include "spdlog/sinks/file_sinks.h"
...
...
@@ -108,8 +109,9 @@ int main(int argc, char* argv[])
{
std
::
cerr
<<
"Error: "
<<
ex
.
what
()
<<
std
::
endl
;
perror
(
"Last error"
);
return
EXIT_FAILURE
;
}
return
0
;
return
EXIT_SUCCESS
;
}
...
...
example/example.cpp
View file @
a0bba7f3
...
...
@@ -25,6 +25,7 @@
//
// spdlog usage example
//
#include <cstdlib> // EXIT_FAILURE
#include <iostream>
#include "spdlog/spdlog.h"
...
...
@@ -106,7 +107,9 @@ int main(int, char*[])
catch
(
const
spd
::
spdlog_ex
&
ex
)
{
std
::
cout
<<
"Log failed: "
<<
ex
.
what
()
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
}
...
...
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