Commit Graph

287 Commits

Author SHA1 Message Date
gabime
a5f5ff70e0 Fixed clang c++20 compile 2021-06-26 17:58:45 +03:00
Gabi Melman
6811112208
Update logger.h 2021-06-24 19:42:12 +03:00
gabime
7b14a65b2b Fixed format_to deprecated warning by wrapping the buffer with std::back_inserter 2021-06-24 17:07:14 +03:00
gabime
e9635c7b2d rethrnow non std exceptions to fix #533 2021-05-01 00:29:36 +03:00
dkavolis
23572369fc Perfect forwarding for arguments 2020-11-02 00:37:03 +00:00
gabime
231ca50700 clang-format 2020-09-26 15:34:05 +03:00
gabime
e69699e12c enable_if 2020-06-08 00:38:30 +03:00
gabime
b0c4794305 Use default pointer type in enable_if 2020-06-06 14:25:36 +03:00
Joe Burzinski
741b0d6e82 Address code review comments: remove perfect forwarding on FormatString template parameters. 2020-06-03 21:47:48 -05:00
Joe Burzinski
3041faffab Address code review comments: revert perfect forwarding on places that didn't need it, remove negative compilation unit test. 2020-06-02 20:30:25 -05:00
Joe Burzinski
30ee690401 Add support for FMT_STRING compile time checking. Add negative compilation unit test for compilers and c++ standard that support relaxed constexpr. 2020-05-31 13:15:40 -05:00
Ron Rechenmacher
faaef7686d pass log_time param by value 2020-04-18 22:44:13 -05:00
Ron Rechenmacher
9e6f5b6b2d add single logger method and log_msg constructor and tests/test_time_point.cpp 2020-04-18 08:58:11 -05:00
Martin Vejdarski
0ca2cb625e Add shared library support for Windows 2020-03-10 03:14:36 +07:00
gabime
5370443ece clang-format 2020-02-10 17:13:41 +02:00
dominicpoeschko
25b10dc264 additional log overload
calling log with a string_view as msg called
```
 template<typename... Args>
    void log(source_loc loc, level::level_enum lvl, string_view_t fmt, const Args &... args)
```

instead of
```
template<class T, typename std::enable_if<std::is_convertible<const T &, spdlog::string_view_t>::value, T>::type * = nullptr>
    void log(source_loc loc, level::level_enum lvl, const T &msg)
```

which lead to an unnecessary call to fmt::format
2020-02-08 11:11:04 +01:00
Cristian Morales Vega
7cdd65075c "#include" <spdlog/.*> instead of "spdlog/.*"
The meaning of using quotes to #include is implementation defined, so it
may or not may be what we want. At least POSIX
(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html)
says: "headers whose names are enclosed in double-quotes ( "" ) shall be
searched for first in the directory of the file with the #include line",
so not what we want since "spdlog" ends up twice in the path.
2019-11-06 19:15:29 +00:00
gabime
bf40855825 Micro-optimize level checking by inlining 2019-11-03 17:04:34 +02:00
gabime
79468cf676 Micro-optimze log_it_ 2019-11-03 17:00:12 +02:00
gabime
15b393193a Replaced a forgotten try with SPDLOG_TRY 2019-11-03 15:16:03 +02:00
Florian Pigorsch
4aad51a352 Fix some spelling errors.
casese -> cases (1)
chache -> cache (1)
cirucal -> circular (1)
dependecy -> dependency (1)
detrmine -> determine (2)
eavluate -> evaluate (1)
exertnal -> external (1)
ony -> only (1)
registation -> registration (3)
registring -> registering (2)
regsistration -> registration (3)
seperate -> separate (2)
wit -> with (1)
withe -> with (1)
2019-10-19 09:42:38 +02:00
gabime
9a0a0c2d8c clang-format 2019-10-18 16:14:08 +03:00
gabime
fcc809f4f1 Refactored logger 2019-10-18 16:10:57 +03:00
gabime
9369fe8c27 Fix #1262 2019-10-09 21:41:02 +03:00
Gabi Melman
bf49bebe7a
Update logger.h 2019-10-01 01:50:18 +03:00
gabime
4c45c6fbd8 Removed redundant func 2019-09-05 02:31:23 +03:00
gabime
f795297e15 try different apprach to backtracer object 2019-09-05 00:39:11 +03:00
gabime
ed8d099607 Fixed #1197 2019-08-29 01:05:23 +03:00
gabime
f3a7ef1199 Fix compile bug 2019-08-28 23:53:00 +03:00
Gabi Melman
cb890c96b9
Update logger.h 2019-08-28 22:59:16 +03:00
gabime
f5492aed12 Unified usage of fmt::memory_buffer across the codebase 2019-08-28 18:46:09 +03:00
gabime
c97c025adb clang-format 2019-08-27 20:22:07 +03:00
gabime
0fa09f6af4 Removed dead clode 2019-08-27 16:39:18 +03:00
gabime
011ed270e8 backtrace support for wchar api under windows 2019-08-27 15:06:53 +03:00
gabime
408a162044 Removed logger::clone() from API 2019-08-27 01:16:57 +03:00
gabime
e1be7f3d6f Refactoring to better support backtrace 2019-08-27 00:56:49 +03:00
gabime
04a8485b17 Replaced backtace implementation 2019-08-26 19:59:16 +03:00
gabime
f3e379cf78 Fixed async dump_backtrace 2019-08-25 23:55:35 +03:00
gabime
099137fe9a backtrace_sink code cleanup 2019-08-25 18:05:47 +03:00
gabime
a7f7984c4a backtrace support api 2019-08-25 17:24:17 +03:00
gabime
dd33c16aae Replace backtrace trigger with dump_backtrace() 2019-08-23 14:47:40 +03:00
gabime
8d8aacf5e9 Protect from double call to enable_backtrace() 2019-08-23 03:17:45 +03:00
gabime
a6d8b52686 Added enable_backtrace to spdlog_api 2019-08-23 02:28:52 +03:00
gabime
0284a23d0a Changed sink_it_ to accept const log_message& 2019-08-22 19:57:59 +03:00
gabime
0335e3fcc0 Print error and abort instead of throw if SPDLOG_NO_EXEPTIONS is defined 2019-08-19 11:31:33 +03:00
gabime
6506b73523 Add noexcept to move ctor and operator= 2019-08-18 17:33:35 +03:00
gabime
01eb59ca9b Removed spdlog::default_level and its usage in registry 2019-08-16 19:04:49 +03:00
gabime
ffb7c317b5 Fix #1176 again 2019-08-09 10:16:18 +03:00
Gabi Melman
bb7420fc22
Update logger.h 2019-08-07 06:15:46 +03:00
gabime
0df9164e7c Fix #1176 2019-08-07 01:29:59 +03:00
Charles Milette
eb51f37c67
Fix ambiguous overload errors 2019-07-24 13:52:03 -04:00
Charles Milette
4ef4d0659d
Improve correctness of convertion checks 2019-07-24 13:30:43 -04:00
Charles Milette
2ce9a3f70f
Add overload to logger when T can be statically converted to wstring_view_t 2019-07-24 13:27:54 -04:00
gabime
a7ba6e447d clang-format 2019-07-18 14:26:36 +03:00
gabime
3c30f77d31 limit default error handler to 1 message/second to avoid flood 2019-07-17 18:05:01 +03:00
gabime
bcb6484062 Removed redundant include statements 2019-07-17 16:09:39 +03:00
gabime
11472eddbc Catch sink exceptions without affecting other sinks 2019-07-17 16:01:30 +03:00
gabime
8d758add63 Relace remaining const char* with string_view_t in the API 2019-07-07 12:55:56 +03:00
Matthias Moulin
5a7bcd0a4f
Update logger.h 2019-07-06 19:00:49 +02:00
Charles Milette
f529afa625
Use stack allocated space when possible 2019-06-30 21:34:19 -04:00
Charles Milette
3bcd3cef2f
Fix deprecation warnings in filename_to_str 2019-06-30 19:12:16 -04:00
gabime
74e2aa9c66 Micoro optimize macros 2019-06-19 17:13:48 +03:00
gabime
78c833a09f clang-format 2019-06-18 17:05:27 +03:00
gabime
09cb45001b Added copy ctor and assignment to logger 2019-06-15 19:46:41 +03:00
gabime
33a42202c7 Replace string pointer with string_view in log_msg 2019-06-04 16:10:49 +03:00
gabime
bcfa9241b8 Updated copyright headers 2019-06-04 00:09:16 +03:00
gabime
38f6b5ea71 Keep clang-tidy happy 2019-06-03 22:49:21 +03:00
gabime
52b6be0dfe Added logger ctor that accepts only name(empty logger) 2019-06-01 14:57:57 +03:00
gabime
6bcb422c80 clang format and SPLDOG_HEADER_ONLY macro 2019-05-12 00:22:39 +03:00
gabime
46ef71e3ec Normalized copyright message 2019-05-11 20:06:17 +03:00
gabime
005450ff13 wip 2019-05-11 13:52:46 +03:00
gabime
9564eb2edb Moved cpp files to inl.h 2019-05-11 13:19:53 +03:00
gabime
69fcaf14e5 wip static-lib 2019-04-27 18:44:48 +03:00
gabime
2de924a187 clang-format 2019-04-27 02:34:50 +03:00
gabime
c1c2ff2d07 wip 2019-04-27 02:33:33 +03:00
gabime
ff89f1476d Restored error_handler as std::function 2019-04-26 18:14:59 +03:00
gabime
13db9d9452 Fix build 2019-04-09 16:46:17 +03:00
Gabi Melman
6bec53dcd2
Update logger.h 2019-04-06 02:14:08 +03:00
gabime
bfbb4e4050 some err handler cleanup 2019-04-05 23:40:27 +03:00
gabime
2aceb13f3e fix support for utf8 logging under win32 2019-04-05 23:34:55 +03:00
gabime
17f9cdd401 static lib wip 2019-04-05 23:05:46 +03:00
gabime
e2e3df9013 static lib wip 2019-04-05 16:44:17 +03:00
gabime
ef8773a89b Moved logger_impl back into logger.h 2019-04-05 13:26:33 +03:00
DanielChabrowski
a6229d9e87 Remove pointless log with enable_if 2019-02-06 05:24:25 +01:00
Jerome Meyer
ce8cf1e152 Fix typos 2018-12-06 16:06:01 -05:00
gabime
bd6d88b884 Removed uneeded locale include 2018-12-05 18:03:56 +02:00
gabime
dc13700094 Fixed source location and make SPDLOG_TRACE: that only one that inject source location info. 2018-11-24 17:08:13 +02:00
gabime
a31719b546 clang-format 2018-11-22 18:49:14 +02:00
gabime
f2305fe5bf Support for source file/line logging 2018-11-22 18:47:50 +02:00
gabime
9b5b4cd505 comment 2018-11-12 12:12:33 +02:00
gabime
c5069135d7 Improved compile time level support 2018-11-12 12:01:10 +02:00
gabime
0e77c3391b New compile time API using SPDLOG_ACTIVE_LEVEL 2018-11-11 18:15:24 +02:00
gabime
240a58fd6e Fixed issue #881 2018-10-24 08:47:02 +03:00
gabime
392d126372 Renamed string_view_type -> string_view_t 2018-10-21 23:50:07 +03:00
gabime
1bdd556d3b code formatting 2018-10-21 23:23:40 +03:00
gabime
9daad800a8 Fix mingw compilation 2018-10-21 19:26:11 +03:00
gabime
8d2c956563 Optimize log(const T&) if can be statically converted to string_view 2018-10-21 19:04:55 +03:00
gabime
0584d6d89b Removed logn declaration 2018-10-21 18:38:37 +03:00
Jerome Meyer
cb71fea0f6 Use fmt::string_view when logging a C string to avoid unnecessary copy 2018-10-18 11:04:20 -04:00
gabime
36112371c0 Reverted const qualifier to log_msg& args, fixed issue #849, and added counter tests 2018-10-05 14:23:37 +03:00
gabime
2fa538779f Fixed static_assert 2018-10-04 02:20:47 +03:00
gabime
b7a6659451 code formatting 2018-10-04 02:10:46 +03:00
gabime
102c31a04c Accecpt iterators by value in logger ctor insted of ref 2018-10-04 02:06:39 +03:00
gabime
8b42b7d269 Fix support for wchar to utf8 under windows (fix issue #851 and #764) 2018-10-02 18:27:49 +03:00
gabime
a06d32ae19 Fixed clang-tidy warnings 2018-09-27 01:14:35 +03:00
gabime
5d7845c138 Added "clone()" support to loggers 2018-08-25 17:55:31 +03:00
gabime
91d8869f36 Added "clone()" support to loggers 2018-08-25 17:35:20 +03:00
gabime
33329c80a9 code formatting 2018-07-23 00:13:52 +03:00
gabime
693103af9c support set_formatter in spdlog.h 2018-07-22 21:52:46 +03:00
gabime
9e4925eff0 clang format 2018-07-21 23:48:07 +03:00
gabime
ddb3002bc1 Added non const sinks() function to support addition/removal of sinks from existing logger 2018-07-20 12:49:30 +01:00
gabime
9df2bd256e Changed some functions to accept strings instead of ref to strings for better semantics 2018-07-19 14:54:26 +03:00
gabime
c2a49080aa Refactored sink interface and base_sink 2018-07-14 16:21:53 +03:00
gabime
16ee72da7c clang format 2018-07-10 23:53:00 +03:00
gabime
81f29a9a7a Fixed wchar support in messages 2018-07-10 17:01:49 +03:00
gabime
4f1ce9189f Fixed issue #747 2018-07-07 16:40:29 +03:00
gabime
775e410b00 Fixed issue #747 2018-07-07 16:29:05 +03:00
gabime
c9331594bb Renamed file to pattern_forammter.h and fixed utc support 2018-07-07 16:15:17 +03:00
Gabi Melman
3ebdb2fd8b
Update logger.h 2018-07-06 08:40:55 +03:00
gabime
0c19bdd772 pattern per sink and pattern caching 2018-06-24 01:32:39 +03:00
gabime
a21594bec7 move underscores to the end of private members 2018-06-10 22:59:17 +03:00
gabime
caa26a2a47 Normalized spdlog include paths 2018-04-29 01:31:09 +03:00
gabime
c962c88342 Fixed linux port of v1.x 2018-04-20 13:20:19 +03:00
gabime
11e068d7a3 Added missing #include 2018-04-19 17:50:18 +03:00
gabime
6f4cd8d397 thread_pool and refactoring async 2018-04-14 03:34:57 +03:00
gabime
7eb6ca6337 formatting 2018-03-17 12:49:45 +02:00
Gabi Melman
fe8a519434
Update logger.h 2018-03-16 22:03:54 +02:00
gabime
4445f6f869 formatting 2018-03-16 17:35:56 +02:00
gabime
5afb5dc782 Changed clang formatting for templates 2018-03-16 17:13:50 +02:00
gabime
a2653d409f clang-format 2018-03-09 15:26:33 +02:00
Daniel Chabrowski
5355bd3a8f readability-named-parameter 2018-02-25 12:39:37 +01:00
Daniel Chabrowski
9ce66f2c9a modernize-pass-by-value 2018-02-25 01:58:09 +01:00
Daniel Chabrowski
ad624432d8 google-explicit-constructor 2018-02-25 01:40:46 +01:00
gabime
f5939f9e56 astyle 2017-12-01 03:46:19 +02:00
Gabi Melman
613f024d42
Removed forgotten *_if declarations 2017-11-30 23:42:57 +02:00
gabime
dcc7b347ca Removed all *_if functions (trace_if, debug_if, info_if,..) because they are redundant and confusing way to preform if 2017-11-25 15:19:41 +02:00
daylanKifky
27e7412640 modified path on quoted #includes
Paths pointing to the root of the library where replaced for ones relatives to each file.

For example, inside /include/spdlog/details/file_helper.h:

This will look for os.h in /include/spdlog/details/spdlog/details/ which doesn't exists.

replaced with:
2017-11-11 13:44:27 +01:00
gabime
709948ff4a Fixed issue #527 2017-10-12 19:48:04 +03:00
Alexei Pastuchov
8fd16fc45e code formatting (astyle and dos2unix)
it aims to solve the issue #467
2017-06-29 09:51:44 +02:00
Asit Kumar Dhal
b463b06ab5 conditional logging for all levels 2017-06-17 16:07:04 +02:00
Asit Kumar Dhal
9a189badbd conditional logging implementation 2017-06-17 15:54:44 +02:00
Asit Kumar Dhal
ed7c3a83f8 conditional logging implementation 2017-06-17 02:45:24 +02:00
ThePhD
d98d54896b use if statement instead of switch (changes of adding new time specifications outside of standard are probably unlikely anyhow)
pattern_time -> pattern_time_type
ptime variable name -> pattern_time variable name
make sure four spaces used, not tabs
2017-05-31 12:52:12 -04:00
ThePhD
5c5080d304 implement a flag (in this case, an enumeration) that allows control over the type; we make it an enum for possible expansions of time abstractions that might make it into the C++ standard in the future (see Howard Hinnant's date/timezone library) or might be usefully-available from the OS at some point in time 2017-05-30 18:05:25 -04:00
Tennn
f8d509d010 Fixed issues 449
Please check it
2017-05-21 17:44:44 +08:00
Alexander Zilberkant
f29ff77ae7 implement message counter feature
adds %i logger pattern for printing log message sequence ID
2017-05-18 22:46:16 +03:00
gabime
1d6842f0f9 bugfix in color detection and astyle 2017-05-17 00:06:11 +03:00
Sidyhe
8ee6d38501 add wide string to utf8 string support 2017-05-10 21:02:41 +08:00
gabime
0c276beaaf astyle 2017-03-28 02:08:18 +03:00
gabime
397d4866b3 Fixed issue #396 and added some tests to catch it 2017-03-28 01:54:33 +03:00