Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
8fb32dcb
Commit
8fb32dcb
authored
Oct 24, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gcc fixes
parent
6eaf1419
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
15 deletions
+8
-15
bench.cpp
example/bench.cpp
+1
-1
example.cpp
example/example.cpp
+1
-1
logger_impl.h
include/c11log/details/logger_impl.h
+4
-10
logger.h
include/c11log/logger.h
+2
-3
No files found.
example/bench.cpp
View file @
8fb32dcb
...
...
@@ -17,7 +17,7 @@ int main(int argc, char* argv[])
{
const
unsigned
int
howmany
=
argc
<=
1
?
600000
:
atoi
(
argv
[
1
]);
c11log
::
set_format
(
"%t"
);
//
c11log::set_format("%t");
auto
console
=
c11log
::
create
<
sinks
::
stdout_sink_st
>
(
"reporter"
);
//console->set_format("[%n %l] %t");
console
->
set_level
(
c11log
::
level
::
INFO
);
...
...
example/example.cpp
View file @
8fb32dcb
...
...
@@ -16,7 +16,7 @@ details::fast_oss f(const std::string& what)
oss
<<
what
;
return
oss
;
}
int
main
_
(
int
,
char
*
[])
int
main
(
int
,
char
*
[])
{
auto
foss
=
f
(
"test2"
);
...
...
include/c11log/details/logger_impl.h
View file @
8fb32dcb
...
...
@@ -4,7 +4,7 @@
//
#include "
details
/line_logger.h"
#include "
.
/line_logger.h"
inline
c11log
::
logger
::
logger
(
const
std
::
string
&
logger_name
,
sinks_init_list
sinks_list
)
:
...
...
@@ -125,7 +125,7 @@ inline void c11log::logger::_log_msg(details::log_msg& msg)
//
// Global registry functions
//
#include "
details
/registry.h"
#include "
.
/registry.h"
inline
std
::
shared_ptr
<
c11log
::
logger
>
c11log
::
get
(
const
std
::
string
&
name
)
{
return
details
::
registry
::
instance
().
get
(
name
);
...
...
@@ -151,15 +151,9 @@ inline std::shared_ptr<c11log::logger> c11log::create(const std::string& logger_
return
details
::
registry
::
instance
().
create
(
logger_name
,
std
::
forward
(
sinks_begin
),
std
::
forward
(
sinks_end
));
}
inline
void
c11log
::
formatter
(
c11log
::
formatter_ptr
f
)
{
return
details
::
registry
::
instance
().
formatter
(
f
);
}
inline
c11log
::
formatter_ptr
c11log
::
formatter
()
inline
void
c11log
::
set_formatter
(
c11log
::
formatter_ptr
f
)
{
return
details
::
registry
::
instance
().
formatter
(
);
details
::
registry
::
instance
().
formatter
(
f
);
}
inline
void
c11log
::
set_format
(
const
std
::
string
&
format_string
)
...
...
include/c11log/logger.h
View file @
8fb32dcb
...
...
@@ -31,7 +31,7 @@ public:
template
<
class
It
>
logger
(
const
std
::
string
&
name
,
const
It
&
begin
,
const
It
&
end
);
void
c11log
::
logger
::
set_format
(
const
std
::
string
&
format
);
void
set_format
(
const
std
::
string
&
);
void
set_formatter
(
formatter_ptr
);
formatter_ptr
get_formatter
()
const
;
...
...
@@ -92,8 +92,7 @@ std::shared_ptr<c11log::logger> create(const std::string& logger_name, const Arg
template
<
class
It
>
std
::
shared_ptr
<
logger
>
create
(
const
std
::
string
&
logger_name
,
const
It
&
sinks_begin
,
const
It
&
sinks_end
);
void
formatter
(
formatter_ptr
f
);
formatter_ptr
formatter
();
void
set_formatter
(
formatter_ptr
f
);
void
set_format
(
const
std
::
string
&
format_string
);
}
...
...
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