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
1472048b
Unverified
Commit
1472048b
authored
Oct 19, 2019
by
Gabi Melman
Committed by
GitHub
Oct 19, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1275 from flopp/spelling
Fix some spelling errors.
parents
9a0a0c2d
4aad51a3
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
20 additions
and
20 deletions
+20
-20
CMakeLists.txt
CMakeLists.txt
+2
-2
async.h
include/spdlog/async.h
+1
-1
circular_q.h
include/spdlog/details/circular_q.h
+1
-1
file_helper-inl.h
include/spdlog/details/file_helper-inl.h
+1
-1
os.h
include/spdlog/details/os.h
+1
-1
pattern_formatter-inl.h
include/spdlog/details/pattern_formatter-inl.h
+1
-1
registry-inl.h
include/spdlog/details/registry-inl.h
+2
-2
registry.h
include/spdlog/details/registry.h
+1
-1
logger-inl.h
include/spdlog/logger-inl.h
+1
-1
logger.h
include/spdlog/logger.h
+1
-1
daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+1
-1
spdlog-inl.h
include/spdlog/spdlog-inl.h
+2
-2
spdlog.h
include/spdlog/spdlog.h
+1
-1
meson.build
meson.build
+1
-1
test_macros.cpp
tests/test_macros.cpp
+1
-1
test_registry.cpp
tests/test_registry.cpp
+2
-2
No files found.
CMakeLists.txt
View file @
1472048b
...
...
@@ -121,7 +121,7 @@ target_link_libraries(spdlog_header_only INTERFACE Threads::Threads)
#---------------------------------------------------------------------------------------
# Use fmt package if using ex
ert
nal fmt
# Use fmt package if using ex
ter
nal fmt
#---------------------------------------------------------------------------------------
if
(
SPDLOG_FMT_EXTERNAL
)
if
(
NOT TARGET fmt::fmt
)
...
...
@@ -133,7 +133,7 @@ if(SPDLOG_FMT_EXTERNAL)
target_compile_definitions
(
spdlog_header_only INTERFACE SPDLOG_FMT_EXTERNAL
)
target_link_libraries
(
spdlog_header_only INTERFACE fmt::fmt
)
set
(
PKG_CONFIG_REQUIRES fmt
)
# add dependecy to pkg-config
set
(
PKG_CONFIG_REQUIRES fmt
)
# add depende
n
cy to pkg-config
endif
()
if
(
SPDLOG_WCHAR_SUPPORT
)
...
...
include/spdlog/async.h
View file @
1472048b
...
...
@@ -6,7 +6,7 @@
//
// Async logging using global thread pool
// All loggers created here share same global thread pool.
// Each log message is pushed to a queue along with
e
a shared pointer to the
// Each log message is pushed to a queue along with a shared pointer to the
// logger.
// If a logger deleted while having pending messages in the queue, it's actual
// destruction will defer
...
...
include/spdlog/details/circular_q.h
View file @
1472048b
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
// cir
ucal
q view of std::vector.
// cir
cular
q view of std::vector.
#pragma once
#include <vector>
...
...
include/spdlog/details/file_helper-inl.h
View file @
1472048b
...
...
@@ -119,7 +119,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension
return
std
::
make_tuple
(
fname
,
filename_t
());
}
// treat cases
e
like "/etc/rc.d/somelogfile or "/abc/.hiddenfile"
// treat cases like "/etc/rc.d/somelogfile or "/abc/.hiddenfile"
auto
folder_index
=
fname
.
rfind
(
details
::
os
::
folder_sep
);
if
(
folder_index
!=
filename_t
::
npos
&&
folder_index
>=
ext_index
-
1
)
{
...
...
include/spdlog/details/os.h
View file @
1472048b
...
...
@@ -81,7 +81,7 @@ int pid() SPDLOG_NOEXCEPT;
// Source: https://github.com/agauniyal/rang/
bool
is_color_terminal
()
SPDLOG_NOEXCEPT
;
// Detrmine if the terminal attached
// Det
e
rmine if the terminal attached
// Source: https://github.com/agauniyal/rang/
bool
in_terminal
(
FILE
*
file
)
SPDLOG_NOEXCEPT
;
...
...
include/spdlog/details/pattern_formatter-inl.h
View file @
1472048b
...
...
@@ -596,7 +596,7 @@ public:
#ifdef _WIN32
int
total_minutes
=
get_cached_offset
(
msg
,
tm_time
);
#else
// No need to c
h
ache under gcc,
// No need to cache under gcc,
// it is very fast (already stored in tm.tm_gmtoff)
(
void
)(
msg
);
int
total_minutes
=
os
::
utc_minutes_offset
(
tm_time
);
...
...
include/spdlog/details/registry-inl.h
View file @
1472048b
...
...
@@ -254,10 +254,10 @@ SPDLOG_INLINE std::recursive_mutex ®istry::tp_mutex()
return
tp_mutex_
;
}
SPDLOG_INLINE
void
registry
::
set_automatic_registration
(
bool
automatic_reg
s
istration
)
SPDLOG_INLINE
void
registry
::
set_automatic_registration
(
bool
automatic_registration
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
logger_map_mutex_
);
automatic_registration_
=
automatic_reg
s
istration
;
automatic_registration_
=
automatic_registration
;
}
SPDLOG_INLINE
registry
&
registry
::
instance
()
...
...
include/spdlog/details/registry.h
View file @
1472048b
...
...
@@ -77,7 +77,7 @@ public:
std
::
recursive_mutex
&
tp_mutex
();
void
set_automatic_registration
(
bool
automatic_reg
s
istration
);
void
set_automatic_registration
(
bool
automatic_registration
);
static
registry
&
instance
();
...
...
include/spdlog/logger-inl.h
View file @
1472048b
...
...
@@ -90,7 +90,7 @@ SPDLOG_INLINE const std::string &logger::name() const
}
// set formatting for the sinks in this logger.
// each sink will get a sep
e
rate instance of the formatter object.
// each sink will get a sep
a
rate instance of the formatter object.
SPDLOG_INLINE
void
logger
::
set_formatter
(
std
::
unique_ptr
<
formatter
>
f
)
{
for
(
auto
it
=
sinks_
.
begin
();
it
!=
sinks_
.
end
();
++
it
)
...
...
include/spdlog/logger.h
View file @
1472048b
...
...
@@ -303,7 +303,7 @@ public:
const
std
::
string
&
name
()
const
;
// set formatting for the sinks in this logger.
// each sink will get a sep
e
rate instance of the formatter object.
// each sink will get a sep
a
rate instance of the formatter object.
void
set_formatter
(
std
::
unique_ptr
<
formatter
>
f
);
void
set_pattern
(
std
::
string
pattern
,
pattern_time_type
time_type
=
pattern_time_type
::
local
);
...
...
include/spdlog/sinks/daily_file_sink.h
View file @
1472048b
...
...
@@ -95,7 +95,7 @@ protected:
base_sink
<
Mutex
>::
formatter_
->
format
(
msg
,
formatted
);
file_helper_
.
write
(
formatted
);
// Do the cleaning ony at the end because it might throw on failure.
// Do the cleaning on
l
y at the end because it might throw on failure.
if
(
should_rotate
&&
max_files_
>
0
)
{
delete_old_
();
...
...
include/spdlog/spdlog-inl.h
View file @
1472048b
...
...
@@ -92,9 +92,9 @@ SPDLOG_INLINE void shutdown()
details
::
registry
::
instance
().
shutdown
();
}
SPDLOG_INLINE
void
set_automatic_registration
(
bool
automatic_registation
)
SPDLOG_INLINE
void
set_automatic_registration
(
bool
automatic_regist
r
ation
)
{
details
::
registry
::
instance
().
set_automatic_registration
(
automatic_registation
);
details
::
registry
::
instance
().
set_automatic_registration
(
automatic_regist
r
ation
);
}
SPDLOG_INLINE
std
::
shared_ptr
<
spdlog
::
logger
>
default_logger
()
...
...
include/spdlog/spdlog.h
View file @
1472048b
...
...
@@ -100,7 +100,7 @@ void drop_all();
void
shutdown
();
// Automatic registration of loggers when using spdlog::create() or spdlog::create_async
void
set_automatic_registration
(
bool
automatic_registation
);
void
set_automatic_registration
(
bool
automatic_regist
r
ation
);
// API for using default logger (stdout_color_mt),
// e.g: spdlog::info("Message {}", 1);
...
...
meson.build
View file @
1472048b
...
...
@@ -21,7 +21,7 @@ dep_list += dependency('threads')
# Check for FMT
if get_option('external_fmt')
if not meson.version().version_compare('>=0.49.0')
warning('Finding fmt can fail wit meson versions before 0.49.0')
warning('Finding fmt can fail wit
h
meson versions before 0.49.0')
endif
dep_list += dependency('fmt')
compile_args += '-DSPDLOG_FMT_EXTERNAL'
...
...
tests/test_macros.cpp
View file @
1472048b
...
...
@@ -40,7 +40,7 @@ TEST_CASE("disable param evaluation", "[macros]")
SPDLOG_TRACE
(
"Test message {}"
,
throw
std
::
runtime_error
(
"Should not be evaluated"
));
}
// ensure that even if right macro level is on- don't e
av
luate if the logger's level is not high enough
// ensure that even if right macro level is on- don't e
va
luate if the logger's level is not high enough
TEST_CASE
(
"disable param evaluation2"
,
"[macros]"
)
{
auto
logger
=
std
::
make_shared
<
spdlog
::
logger
>
(
"test-macro"
);
...
...
tests/test_registry.cpp
View file @
1472048b
...
...
@@ -9,7 +9,7 @@ TEST_CASE("register_drop", "[registry]")
spdlog
::
drop_all
();
spdlog
::
create
<
spdlog
::
sinks
::
null_sink_mt
>
(
tested_logger_name
);
REQUIRE
(
spdlog
::
get
(
tested_logger_name
)
!=
nullptr
);
// Throw if registring existing name
// Throw if regist
e
ring existing name
REQUIRE_THROWS_AS
(
spdlog
::
create
<
spdlog
::
sinks
::
null_sink_mt
>
(
tested_logger_name
),
spdlog
::
spdlog_ex
);
}
...
...
@@ -19,7 +19,7 @@ TEST_CASE("explicit register", "[registry]")
auto
logger
=
std
::
make_shared
<
spdlog
::
logger
>
(
tested_logger_name
,
std
::
make_shared
<
spdlog
::
sinks
::
null_sink_st
>
());
spdlog
::
register_logger
(
logger
);
REQUIRE
(
spdlog
::
get
(
tested_logger_name
)
!=
nullptr
);
// Throw if registring existing name
// Throw if regist
e
ring existing name
REQUIRE_THROWS_AS
(
spdlog
::
create
<
spdlog
::
sinks
::
null_sink_mt
>
(
tested_logger_name
),
spdlog
::
spdlog_ex
);
}
#endif
...
...
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