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
e27b45e3
Commit
e27b45e3
authored
Feb 21, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed uneeded files
parent
c5a8eb5c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
100 deletions
+9
-100
example.cpp
example/example.cpp
+5
-5
blocking_queue.h
include/c11log/details/blocking_queue.h
+1
-3
message.h
include/c11log/details/message.h
+0
-31
null_mutex.h
include/c11log/details/null_mutex.h
+0
-16
formatter.h
include/c11log/formatter.h
+2
-2
log_exception.h
include/c11log/log_exception.h
+0
-42
base_sink.h
include/c11log/sinks/base_sink.h
+1
-1
No files found.
example/example.cpp
View file @
e27b45e3
...
@@ -56,11 +56,11 @@ int main(int argc, char* argv[])
...
@@ -56,11 +56,11 @@ int main(int argc, char* argv[])
int
qsize
=
atoi
(
argv
[
1
]);
int
qsize
=
atoi
(
argv
[
1
]);
int
threads
=
atoi
(
argv
[
2
]);
int
threads
=
atoi
(
argv
[
2
]);
using
namespace
c11log
::
sinks
;
using
namespace
c11log
;
auto
null_sink
=
std
::
make_shared
<
null_sink
>
();
auto
null_sink
=
std
::
make_shared
<
sinks
::
null_sink
>
();
auto
stdout_sink
=
std
::
make_shared
<
stdout_sink
>
();
auto
stdout_sink
=
std
::
make_shared
<
s
inks
::
s
tdout_sink
>
();
auto
async
=
std
::
make_shared
<
async_sink
>
(
qsize
);
auto
async
=
std
::
make_shared
<
sinks
::
async_sink
>
(
qsize
);
auto
fsink
=
std
::
make_shared
<
rotating_file_sink
>
(
"example_log"
,
"txt"
,
1024
*
1024
*
50
,
5
);
auto
fsink
=
std
::
make_shared
<
sinks
::
rotating_file_sink
>
(
"example_log"
,
"txt"
,
1024
*
1024
*
50
,
5
);
async
->
add_sink
(
fsink
);
async
->
add_sink
(
fsink
);
...
...
include/c11log/details/blocking_queue.h
View file @
e27b45e3
...
@@ -103,9 +103,7 @@ private:
...
@@ -103,9 +103,7 @@ private:
std
::
mutex
mutex_
;
std
::
mutex
mutex_
;
std
::
condition_variable
item_pushed_cond_
;
std
::
condition_variable
item_pushed_cond_
;
std
::
condition_variable
item_popped_cond_
;
std
::
condition_variable
item_popped_cond_
;
const
std
::
chrono
::
hours
one_hour
{
const
std
::
chrono
::
hours
one_hour
(
1
);
1
};
};
};
}
}
...
...
include/c11log/details/message.h
deleted
100644 → 0
View file @
c5a8eb5c
#pragma once
#include <chrono>
#include <string>
#include "../level.h"
namespace
c11log
{
namespace
details
{
struct
message
{
message
(
const
std
::
string
&
logger_name
,
level
::
level_enum
log_level
,
const
std
::
chrono
::
system_clock
::
time_point
time_p
,
const
std
::
string
&
msg
)
:
logger_name
(
logger_name
),
log_level
(
log_level
),
time_p
(
time_p
),
msg
(
msg
)
{}
~
message
()
=
default
;
message
(
const
message
&
other
)
=
default
;
message
&
operator
=
(
const
message
&
rhs
)
=
default
;
std
::
string
logger_name
;
level
::
level_enum
log_level
;
std
::
chrono
::
system_clock
::
time_point
time_p
;
std
::
string
msg
;
};
}
}
include/c11log/details/null_mutex.h
deleted
100644 → 0
View file @
c5a8eb5c
#pragma once
namespace
c11log
{
namespace
details
{
struct
null_mutex
{
void
lock
()
{
}
void
unlock
()
{
}
bool
try_lock
()
{
return
true
;
}
};
}
}
\ No newline at end of file
include/c11log/formatter
s/formatters
.h
→
include/c11log/formatter.h
View file @
e27b45e3
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
#include<functional>
#include<functional>
#include <sstream>
#include <sstream>
#include "
../
level.h"
#include "level.h"
#include "
../
details/os.h"
#include "details/os.h"
namespace
c11log
{
namespace
c11log
{
namespace
formatters
{
namespace
formatters
{
...
...
include/c11log/log_exception.h
deleted
100644 → 0
View file @
c5a8eb5c
#pragma once
#include <sstream>
#include <iostream>
namespace
c11log
{
class
log_exception
:
public
std
::
exception
{
public
:
log_exception
()
:
_oss
(),
_msg
()
{
}
virtual
~
log_exception
()
{
}
explicit
log_exception
(
const
std
::
string
&
msg
)
:
_oss
(
msg
,
std
::
ostringstream
::
ate
),
_msg
(
msg
)
{
}
log_exception
(
const
log_exception
&
other
)
:
_oss
(
other
.
_oss
.
str
()),
_msg
(
other
.
_msg
)
{
}
log_exception
&
operator
=
(
const
log_exception
&
other
)
{
_oss
.
str
(
other
.
_oss
.
str
());
_msg
=
other
.
_msg
;
return
*
this
;
}
virtual
const
char
*
what
()
const
throw
()
override
{
return
_msg
.
c_str
();
}
template
<
typename
T
>
log_exception
&
operator
<<
(
const
T
&
what
)
{
_oss
<<
what
;
_msg
=
_oss
.
str
();
return
*
this
;
}
private
:
std
::
ostringstream
_oss
;
std
::
string
_msg
;
};
}
\ No newline at end of file
include/c11log/sinks/base_sink.h
View file @
e27b45e3
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include<string>
#include<string>
#include<atomic>
#include<atomic>
#include "../formatter
s/formatters
.h"
#include "../formatter.h"
#include "../level.h"
#include "../level.h"
namespace
c11log
{
namespace
c11log
{
...
...
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