Commit Graph

197 Commits

Author SHA1 Message Date
Gabi Melman 650daf7542
Update common.h
Updated spdlog version macro to 0.16.4-rc
2018-03-09 23:26:28 +02:00
gabime ad221b0990 Changed function name to level::from_str 2018-03-09 15:27:53 +02:00
gabime 461b5ef28a Fixed missing ; 2018-03-09 15:26:00 +02:00
gabime 7f1f7b6232 Changed function name to level::from_str 2018-03-09 15:24:37 +02:00
fegomes 46f9768599 change of scope the name_to_level variable 2018-03-09 09:04:44 -03:00
fegomes c21dd874d1 removed class to return size of array. 2018-03-08 19:09:46 -03:00
fegomes 48c8755d06 include test to convert functions and change suggested by @gabime 2018-03-08 19:08:24 -03:00
fegomes f9750dddee Merge branch 'master' into to_level 2018-03-08 18:16:10 -03:00
Daniel Chabrowski 0c94ce0039 deleted copy op and a little format 2018-02-25 03:35:20 +01:00
Daniel Chabrowski ad624432d8 google-explicit-constructor 2018-02-25 01:40:46 +01:00
Daniel Chabrowski fb6df0512f modernize-use-override 2018-02-24 23:56:56 +01:00
Daniel Chabrowski 7f4c1bb77c modernize-use-using 2018-02-24 22:35:09 +01:00
gabime 04d0dd5987 moved SPDLOG_VERSION macro to common.h 2018-02-23 14:39:41 +02:00
gabime 051048ebd7 Fixed issue #645 (include tweakme.h from common.h) 2018-02-23 14:34:25 +02:00
Fernando Gomes f4ffddc942
Merge branch 'master' into to_level 2018-02-05 09:52:30 -02:00
gabime 5ab033fba5 Fix issue #629 2018-02-05 12:20:57 +02:00
fegomes 8696ad8739 new function to convert level_enum from string 2018-01-24 23:08:46 -02:00
gabime adbc22096a enable final keyword by default. Can be disabled in tweakme.h for older compilers 2017-11-25 15:53:35 +02:00
gabime e7cf25a1c0 fixed issue #562 2017-11-25 15:41:55 +02:00
gabime 8ca1d84a32 Removed catch(..) from the codebase. Catch only std::exception 2017-11-12 19:46:15 +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
Costin Manolache f4f3e3fb66
Use __ANDROID__
Based on review feedback.
2017-11-03 19:37:38 -07:00
Costin Manolache 23dd8d3559
Allow compilation on platforms with unwind (android) 2017-11-02 17:12:08 -07:00
manuel-schiller 039b34e83a rethrow unwind exception
On Linux with pthread library spdlog causes an SIGABORT and crashes
the application in case it catches a thread specific cancellation
exception in a critical execution phase while in a try/catch block
in spdlog/detail/logger_impl.h

The exception is caught by some general catch(...) clause where
it is NOT rethrown.

However rethrowing these kind of exception is mandatory, otherwise
an abort will be caused by the glibc.
2017-10-25 10:15:27 +02:00
Asit Kumar Dhal 3a40f0c34d fixed length and upper case log level tags 2017-07-12 20:25:32 +02:00
Gabi Melman 9470bdd3ec Update common.h 2017-06-01 03:42:10 +03: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
Jean-Michaël Celerier 4da5fa256c add SPDLOG_FINAL information in tweakme.h 2017-04-28 19:25:31 +02:00
Jean-Michaël Celerier 53138c20fb Add an optional final qualifier to types
When building with GCC's -Wfinal-types, a lot of types of spdlog
are marked as being more optimizable if they were marked final.

This patch adds a possibility for the user of the library to `#define SPDLOG_FINAL final`
and enjoy potentially better performance : GCC is then able to replace virtual calls by true
function calls if it can ensure that there are no derived types).

By default SPDLOG_FINAL is defined to nothing to not break existing code that
may be inheriting of some of these types for some reason.
2017-04-28 17:24:55 +02:00
Gabi Melman 7481a8ecf7 Update common.h 2017-02-03 15:26:47 +02:00
Gabi Melman 904bed92c3 Added SPDLOG_VERSION macro to common.h 2017-02-03 15:11:08 +02:00
Gabi Melman 9eee823041 Fix issue #315 2016-11-14 14:58:10 +02:00
Gabi Melman 541dd88a97 Update common.h 2016-10-09 01:55:47 +03:00
Gabi Melman ca928bc1b0 Fix issue #295
vs 2013 not supports std::atomic_int
2016-10-09 00:41:29 +03:00
gabime b13735dc22 astyle 2016-08-22 20:54:18 +03:00
gabime 20cb73e9da disable syslog by default (enable by #define SPDLOG_ENABLE_SYSLOG ) 2016-08-22 20:52:16 +03:00
Nazım Can Bedir 097ba5a359 Add basic support for Solaris. 2016-08-22 17:26:12 +03:00
Nazım Can Bedir e277f9b05c Make syslog backend tweakable. 2016-08-22 16:39:46 +03:00
Nazım Can Bedir 2678c37b56 Move syslog support tests to one place. 2016-08-22 16:39:13 +03:00
gabime 39cdd08a54 no exceptions while logging 2016-08-05 03:56:40 +03:00
gabime 0ae66b5b28 support for external fmtlib 2016-07-22 18:06:36 +03:00
Gabi Melman f702dce601 Update common.h 2016-07-21 12:41:20 +03:00
gabime 8e0892fa31 astyle 2016-07-15 17:55:34 +03:00
gabime c5c6baad74 Added errno description to sdlog exception strings 2016-07-15 17:48:02 +03:00
gabime e5032c8db5 fixed SPDLOG_TRACE under gcc (isue #241) 2016-07-14 14:59:49 +03:00
gabime 30326dad37 removed level defines 2016-07-09 05:27:47 +03:00
gabime 7ddfb2b877 fixed macros and other stuff for the no-streams branch 2016-07-09 00:46:00 +03:00
gabime 5650f10bab DEPRECATED: operator<< API 2016-07-03 03:43:55 +03:00
gabime 80a432e646 cleaned common.h and moved some code around 2016-05-15 01:45:16 +03:00
gabime 10d5292bbb better support for custom eol 2016-05-15 00:53:35 +03:00
gabime cae43ffef5 fixed issue #199 (_MSC_VER update for vs 2015 to use noexcept instead of throw()) 2016-05-13 16:10:12 +03:00
gabime 0d26359856 astyle 2016-04-20 11:57:49 +03:00
gabime 083d6c0d2f rename atomic level type name 2016-04-10 01:43:52 +03:00
gabime 974379c9be Added support for SPDLOG_NO_ATOMIC_LEVELS in tweakme.h 2016-04-10 01:37:11 +03:00
gabime 19dae96985 wchar filenames support - minor improvements 2016-04-10 00:02:19 +03:00
unknown 113ebcfd97 Add the SPDLOG_USE_WCHAR tweak to enable support for Unicode names on Windows. Refs #111 2016-04-08 12:26:31 -05:00
gabime 495ecaeaee astyle 2016-04-03 02:14:54 +03:00
Kevin M. Godby 077c3095eb Added missing standard header includes. 2016-02-24 22:20:07 -06:00
gabime 8c38b4ee9e MIT license 2015-11-28 18:24:20 +02:00
gabime cadd181d8d Reverted pull #111 - wchar support under windows - it pollutes global namespace with new defines 2015-08-07 14:05:34 +03:00
Ilya Kulakov d905ad915f Use only SPDLOG_USE_WCHAR to control whether wchar_t is enabled. 2015-07-26 15:18:08 -04:00
Artem Martynovich 787aa46693 Disable usage of wchar_t in tests. 2015-07-21 17:32:53 +06:00
Artem Martynovich 0e5c4b9de4 Fix Unix build. Use S("...") instead of L"..." for better compatibility. 2015-07-14 02:13:16 +06:00
Artem Martynovich 2b59393bda Add wchar_t support for Windows. 2015-07-13 19:43:22 +06:00
gabime b715378ff5 Added tweakme.h - enable users to enable/disable features at compile time 2015-04-09 18:05:16 +03:00
gabime 8da33db62f Removed redundant "using log_thread_id=size_t" 2015-04-08 10:56:39 +03:00
gabime 4dd31bf031 fixed pedantic gcc errors 2015-04-07 22:04:10 +03:00
gabime 25afbd79b2 Added compile time option to turn off thread id (#define SPDLOG_NO_THREAD_ID in common.h) 2015-04-07 21:57:38 +03:00
gabime 0684b4f378 use size_t to better represent thread id across platforms 2015-04-07 21:35:41 +03:00
gabime 147ce4c80d #define SPDLOG_NOEXCEPT throw() under visual studio 2015-02-10 01:48:28 +02:00
Gabi Melman 47e695d2fc Update common.h 2015-01-29 12:18:27 +02:00
Gabi Melman 6b0ef15644 Do not use CLOCK_REALTIME_COARSE by default 2015-01-29 12:17:16 +02:00
gabime dae66133c6 comment about clock 2015-01-29 00:47:09 +02:00
gabime 0d7570c745 comment about clock 2015-01-29 00:35:23 +02:00
gabi fb67e571f5 Under linux, use the much faster CLOCK_REALTIME_COARSE clock by default (SPDLOG_CLOCK_COARSE is defined in common.h) 2015-01-29 00:19:37 +02:00
Denis Ivaykin 2f34de820b coarse clock, short log level 2015-01-27 08:31:50 -06:00
gabi b74b28f5c6 added includes to common.h 2015-01-15 11:46:51 +02:00
gabime 9f34c58b3e comments 2015-01-15 11:01:54 +02:00
gabime 89afa909e1 shortened enum policy name and moved into common.h 2015-01-15 10:34:50 +02:00
gabime 40a55b8e34 astyle 2014-12-21 02:47:04 +02:00
gabime d163b8c45a astyle 2014-12-21 02:42:37 +02:00
gabime b1867cfba3 log levels now lowercase 2014-12-21 01:30:39 +02:00
gabi 1e7814295b fixed noexcept in visual studio 2014-12-20 16:24:16 +02:00
Jens Breitbart 67b633880b Replaced throw() with noexcept and removed some unneeded ';'. 2014-12-20 15:06:36 +01:00
gabime 92f2b7556e syslog improvments 2014-12-19 18:01:49 +02:00
Gabi Melman 3b61f50cbf Merge pull request #20 from fooinha/syslog-openlog
Syslog openlog
2014-12-18 20:42:51 +02:00
fooinha 375b88c191 Optional arguments for syslog_logger factory. 2014-12-18 15:47:43 +00:00
gabi 348390f90d Added debug macros 2014-12-18 10:07:21 +02:00
gabime ece27ac952 astyle 2014-11-22 10:29:06 +02:00
Arnaud Kapp 67eef26c26 Add a syslog() based sink for Linux.
This commit introduce a new sink: syslog_sink.
This sink is Linux only, and will write log entries to the system
logger, using the syslog() library call.

It is instanciable using spdlog::syslog_logger(name). Note that
the suffix _st or _mt is not present, as syslog() is thread-safe.

I also applied @gabime reviews and added license header.
2014-11-11 13:49:19 +01:00
xaqq e4adba854c Add NOTICE, ALERT and EMERG log level.
This commit introduces 3 new log level. Thoses are:
    + NOTICE, which is a bit worse that INFO, but still not a warn.
    + ALERT, for case worse that critical.
    + EMERG, application is unusable.

With those 3 log levels, spdlog now has all log level accepted by
the syslog() system call.
2014-11-10 18:47:15 +01:00
gabime 74aae4f368 readme 2014-11-01 03:20:54 +02:00
gabime e8403e17df astyle 2014-11-01 02:28:49 +02:00
gabi 31971bf63b updated example and added more creation functions 2014-10-31 03:17:40 +02:00
gabi c7b8c762fb spdlog 2014-10-31 01:13:27 +02:00