Commit Graph

419 Commits

Author SHA1 Message Date
gabime 3c7103d90d Format 2018-04-29 01:36:45 +03:00
gabime caa26a2a47 Normalized spdlog include paths 2018-04-29 01:31:09 +03:00
gabime d389bda2cc moved file sinks sinks folder 2018-04-29 01:26:10 +03:00
gabime 60f8a68ae0 Splitted file sinks to seperate headers 2018-04-29 01:23:18 +03:00
gabime 4bee0ec294 Fixed stderr_logger typedef 2018-04-29 00:43:24 +03:00
gabime b393c9d6e6 Fixed console traits 2018-04-29 00:23:59 +03:00
gabime e4f0d6446b Small template rename 2018-04-29 00:21:15 +03:00
gabime 9b5c5b4f3d Small template rename 2018-04-29 00:20:04 +03:00
gabime 110bdd93c8 Fixed stdout_sinks 2018-04-20 14:03:15 +03:00
gabime c962c88342 Fixed linux port of v1.x 2018-04-20 13:20:19 +03:00
gabime e4d3eb64e6 Udpated example and spdlog.h 2018-04-20 02:57:05 +03:00
gabime ba7c4c0530 stdout and color logger factories 2018-04-20 01:50:09 +03:00
gabime b9fac2b179 added missing header 2018-04-19 18:40:58 +03:00
gabime 11e068d7a3 Added missing #include 2018-04-19 17:50:18 +03:00
gabime 924ef84241 Refactred spdlog.h and console sinks. Added global lock for all console sinks (traits) 2018-04-18 02:04:10 +03:00
gabime 9bffa921ae global mutex stdout stderr sinks 2018-04-16 01:07:22 +03:00
gabime 6f4cd8d397 thread_pool and refactoring async 2018-04-14 03:34:57 +03:00
gabime 1dea46e1ab code formatting 2018-04-06 04:06:02 +03:00
gabime d040ab93ea wincolor color formatting support 2018-04-06 03:04:18 +03:00
gabime c8610d9a86 support for color formatting 2018-04-06 02:24:07 +03:00
gabime 200815892f Fix clang-tidy warnings about missing braces around if and for statements 2018-03-17 13:42:09 +02:00
gabime 56e4a201ec formatting 2018-03-17 12:47:46 +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
Thiago Bastos d044369e3b Fix implicit conversion warnings (-Wsign-conversion) 2018-03-05 20:00:48 +01:00
Daniel Chabrowski de642b6263 astyle applied 2018-02-25 12:41:18 +01:00
Daniel Chabrowski 35a843f8b6 modernize-return-braced-init-list 2018-02-25 12:24:21 +01:00
Daniel Chabrowski 0c94ce0039 deleted copy op and a little format 2018-02-25 03:35:20 +01:00
Daniel Chabrowski af50d5ef1f readability-inconsistent-declaration-parameter-name 2018-02-25 02:19:26 +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
Daniel Chabrowski 1e1ca23101 modernize-use-equals-default 2018-02-25 01:25:15 +01:00
Daniel Chabrowski 7aed498540 modernize-use-default-member-init 2018-02-25 00:38:54 +01:00
Daniel Chabrowski d5a3bb5234 readability-else-after-return 2018-02-25 00:24:47 +01:00
Daniel Chabrowski 9ebb9ff318 readability-implicit-bool-cast 2018-02-25 00:16:18 +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
Colin Duquesnoy 11ee6834f6
Fix compilation error with GCC 8
error: need 'typename' before 'std::conditional<std::is_same<char, char>::value, fmt::BasicMemoryWriter<char>, fmt::BasicMemoryWriter<wchar_t> >::type' because 'std::conditional<std::is_same<char, char>::value, fmt::BasicMemoryWriter<char>, fmt::BasicMemoryWriter<wchar_t> >' is a dependent scope
         std::conditional<std::is_same<filename_t::value_type, char>::value, fmt::MemoryWriter, fmt::WMemoryWriter>::type w;
2018-02-10 15:15:46 +01:00
Benjamin Schindler 05b2aabe0e Make set_color public in wincolor_sink to retain configurability 2018-02-08 09:14:45 +01:00
gabime 5ab033fba5 Fix issue #629 2018-02-05 12:20:57 +02:00
gabime f8aec1bdf1 Merge branch 'master' of https://github.com/gabime/spdlog.git 2018-02-03 18:58:10 +02:00
gabime 51a83da578 Repplaced map with unordered_map for level->colos mapping 2018-02-03 18:57:57 +02:00
Josh Junon cae749fc9b clear line after writing log message contents 2018-01-18 15:06:47 +01:00
Josh Junon 58e68725ae rename grey to black 2018-01-18 15:03:26 +01:00
Josh Junon a59f74e8a2 remove needless zeros in reset code 2018-01-18 15:03:03 +01:00
Joao Moreno 357a63d914 fix spdlog namespace 2018-01-11 21:58:02 +01:00
Joao Moreno a938045135 use Sleep in Windows instead of sleep_for
fixes #609
2018-01-11 14:50:47 +01:00
Stefan Broekman de4644b44a Issue fix for spdlog #595. Conversion warning.
See: https://github.com/gabime/spdlog/issues/595

On line 85 in file sinks/wincolor_sink.h:
back_color &= ~(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE |
FOREGROUND_INTENSITY);

'back_color' is of type 'WORD' (unsigned short) whereas a bitwise
complement/NOT returns an int. This results in a conversion warning with
-Wconversion enabled.

85:20: warning: conversion to 'WORD {aka short unsigned int}' from 'int'
may alter its value [-Wconversion] back_color &= ~(FOREGROUND_RED |
FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY);

Possible solution:
We know that the result of ~(FOREGROUND_RED | FOREGROUND_GREEN |
FOREGROUND_BLUE | FOREGROUND_INTENSITY) is always within the limits of
an unsigned short so a simple cast should suffice (correct me if I'm
wrong):

back_color &= static_cast<unsigned short>(~(FOREGROUND_RED |
FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY));
2017-12-26 19:23:29 +01:00
gabime 26b390bb19 removed lock from dist_sink::_flush() (moved to base_sink::flush()) 2017-12-02 17:24:02 +02:00
gabime a9149c6d46 added lock on flush in base_sink 2017-12-02 17:06:59 +02:00
gabime f5939f9e56 astyle 2017-12-01 03:46:19 +02:00
gabime 3c4a2bf531 Handle file extensions in rotating and daily loggers 2017-12-01 03:40:49 +02:00
Gabi Melman 587b528292
Merge pull request #556 from jpcima/syslog-build
correct include path for sink/syslog_sink.h
2017-11-14 16:29:20 +02:00
JP Cimalando ecec210d0e accept msvc_sink on all compilers, add name windebug_sink (fixes #554) 2017-11-14 14:41:31 +01:00
JP Cimalando 76d2620dad correct include path for sink/syslog_sink.h 2017-11-14 14:25:43 +01:00
daylanKifky 10772eadae fix wincolor_sink's common.h include 2017-11-11 15:38:08 +01: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
Gabriel Vaduva 3173422786 Background color unchanged
Keep the background color unchaged on Windows console when using colored loggers.
2017-07-29 23:07:02 +03:00
gabime 4371092309 fixed gcc shadow warnings 2017-06-29 18:14:17 +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
Cyres 765095db66 Add set_color to ansicolor_sink
It is now possible again to set the color in the ansicolor_sink with set_color
2017-06-27 01:23:35 +02:00
Remigiusz Kołłątaj fab55c8a14 Fix for MinGW error: 'There are no arguments that depend on a template parameter'
Signed-off-by: Remigiusz Kołłątaj <remigiusz.kollataj@gmail.com>
2017-06-09 19:03:11 +02:00
gabime 13fb2550c6 Fixed issue #449 2017-05-21 20:39:54 +03:00
Tennn f8d509d010 Fixed issues 449
Please check it
2017-05-21 17:44:44 +08:00
gabime 42a56f6669 fixed "final" keyword error 2017-05-21 04:02:32 +03:00
gabime d56fa23eb9 fixed compilation errors 2017-05-21 03:48:54 +03:00
gabime 095cb1f560 Added _flush() to base_sink 2017-05-21 03:43:41 +03:00
Gabi Melman e215758b42 Update ansicolor_sink.h 2017-05-21 03:08:03 +03:00
Gabi Melman 87f5a60b90 Update ansicolor_sink.h 2017-05-21 03:06:35 +03:00
gabime 7da3e47ddc fixed color comment 2017-05-21 02:33:19 +03:00
gabime 1f9f9c09a2 fixed flush 2017-05-21 02:25:33 +03:00
gabime 8c240faa7d changed info color to regular insted of bold 2017-05-21 02:11:09 +03:00
gabime 7bbab6889d use data() istead of c_str() in ansicolor_sink 2017-05-21 02:07:43 +03:00
gabime 6cc7e7382e astyle 2017-05-21 01:56:56 +03:00
gabime 7f84daffd5 fixed compilation 2017-05-21 01:49:06 +03:00
gabime 98addad888 Disable colors if terminal no attached and simplfy ansicolor_sink 2017-05-21 01:36:03 +03:00
gabime 1d6842f0f9 bugfix in color detection and astyle 2017-05-17 00:06:11 +03:00
gabime bd25f59a42 Don't use color escape codes if terminal doesn't support them in ansicolor_sink 2017-05-16 23:35:01 +03:00
Gabi Melman 52292fb526 Update android_sink.h 2017-05-03 01:18:40 +03:00
Gabi Melman 6927aa1544 Update android_sink.h 2017-05-03 01:17:00 +03:00
Alexander Zilberkant 2f205a6dbc android sink - add retry mechanism
- in some cases subsequent calls to __android_log_write() may result with -EAGAIN error code.
  in such cases spdlog will sleep and try again for number of times defined by
  SPDLOG_ANDROID_LOG_NUM_OF_RETRIES

- defeult SPDLOG_ANDROID_LOG_NUM_OF_RETRIES set to 2 - can be overridden at build time
2017-05-02 22:38:50 +03: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 9e6d81de08 Merge pull request #422 from theamirocohen/android_log
Android_logger conditionally apply its own formatting
2017-04-26 00:01:34 +03:00
Amir Cohen 45e3e7041d Android_logger apply its own formatting to every print by adding timestamps, severity, thread and process ids, thus the option flag in the ctor 2017-04-25 19:47:47 +03:00
odeits 6670d3b925 fix typos in base_sink.h 2017-04-06 20:16:49 -04:00
Ľubomír Carik fd8df5b820 Don't hardcode '.txt.' log file name suffix (resolve #333)
Signed-off-by: Ľubomír Carik <Lubomir.Carik@gmail.com>
2017-02-28 00:59:23 +01:00
Gabi Melman 38456118d0 Update null_sink.h 2016-12-31 22:38:00 +02:00
gabime 5d23e88c16 astyle 2016-12-02 17:40:40 +02:00
Onno Broekmans b61be7320a Fix compilation errors in "wincolor_sink.h" 2016-11-25 15:47:21 +01:00
gabime bd6fe569b5 astyle previous commits 2016-11-18 17:17:09 +02:00
Chen Hayat 0c16b9ae1e Remove casting from previous commit and fix the following Klockwork issues:
1. Removing "return" from void functions.
2. Using "const" for operator= argument.
2016-11-01 17:16:07 +02:00
Chen Hayat 83d192b1f1 Fix compilation error C2664 on VS2013
No converting constructor
2016-10-30 17:11:45 +02:00
Gabi Melman 698783861c Fixed vc warning on x64 build 2016-10-17 12:50:38 +03:00
gabime f14d1c002b astyle 2016-10-12 23:08:44 +03:00
gabime 0cfdad4d0b Windows console color support. Replaced color param in API with new functions 2016-10-12 15:10:10 +03:00
gabime 56678a5f6a added set_force_flush(bool) to simple file sink for performance benchmarks 2016-10-01 16:37:33 +03:00
gabime 12800ac466 fixed shadow warnings in gcc 2016-09-30 14:08:31 +03:00
gabime e97621d61d Removed force_flush arg from everywhere. Use flush_on(level) instead 2016-09-18 00:43:42 +03:00
gabime 5653e5c9d7 astyle 2016-09-15 00:38:21 +03:00
Hugh Wang bf02f57475 Fix Android sink.
1. Remove lock.
2. Improve error detection.
3. Remove unsupported log levels.
2016-09-14 17:37:06 +08:00
davide b67076fc85 added level_t to sink. Improves the flexibility of loggers with multiple sinks 2016-09-12 22:26:38 +02:00
Sam Brkopac 0be736c7fc Added the ability to truncate the basic file logger.
Added the ability to truncate the basic file logger.
2016-08-22 13:31:43 -07:00
gabime b13735dc22 astyle 2016-08-22 20:54:18 +03:00
Nazım Can Bedir 2678c37b56 Move syslog support tests to one place. 2016-08-22 16:39:13 +03:00
gabime 5b2bd79b7e Added support for syslog in FreeBSD 2016-08-21 00:57:53 +03:00
gabime aa0f62292b fixed dist_sink in gcc 2016-08-20 15:01:08 +03:00
gabime 916a686f8f astyle 2016-08-20 14:55:50 +03:00
gabime c4298a989e dist sink cleanup 2016-08-20 14:52:26 +03:00
Gabi Melman cee155c1dd typo in comment 2016-08-01 00:38:59 +03:00
gabime 43a4048b92 astyle 2016-07-22 20:19:26 +03:00
gabime 0ae66b5b28 support for external fmtlib 2016-07-22 18:06:36 +03:00
gabime f5bde237dd Updated fmt lib to version 0d5ef5c2a66026409b0cfbafa1d2f46cdc5aa4d0 2016-07-15 18:35:43 +03:00
gabime 842e5236e4 Fixed possible name collision with boost chrono 2016-07-15 17:58:09 +03:00
gabime c5c6baad74 Added errno description to sdlog exception strings 2016-07-15 17:48:02 +03:00
gabime 7ddfb2b877 fixed macros and other stuff for the no-streams branch 2016-07-09 00:46:00 +03:00
gabime 7885aa478c no streams 2016-07-08 17:50:13 +03:00
Kevin M. Godby cb3b7728a1 Fix missing include detected by new header dependency tests. 2016-06-17 00:55:24 -05:00
gabime 38c0ee018b astyle 2016-05-15 01:49:15 +03:00
gabime 80a432e646 cleaned common.h and moved some code around 2016-05-15 01:45:16 +03:00
Gabi Melman 6d5bce46f8 Revert "CMake script improvements" 2016-05-05 10:19:32 +03:00
Kevin M. Godby e10a2fca65 Added missing base_sink.h include. 2016-05-04 19:25:48 -05:00
eao197 ef9842c36d daily_file_sink with custom file name calculator 2016-05-03 16:20:28 +03:00
gabime 0d26359856 astyle 2016-04-20 11:57:49 +03:00
Anton Goryunov ba68a2d05d - std::cout replaced with fwrite to stdout in console sink 2016-04-14 23:05:05 +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
gabime 296623baa3 API for color support in console logger 2016-04-03 01:38:49 +03:00
gabime e9633a5363 Merge branch 'master' of https://github.com/gabime/spdlog 2016-03-30 21:49:25 +03:00
gabime 006ac6685a temporary removed sqlite_sink from the project (not compiling well under gcc) 2016-03-30 21:49:09 +03:00
gabime ccabe07f3f license 2016-03-30 19:54:42 +03:00
gabime d405027fe9 renamed setColor 2016-03-30 19:52:32 +03:00
gabime 487c318788 ansicolor sink improvments (remove warning and uneeded string concat) 2016-03-30 19:34:40 +03:00
gabime a2061e3780 fix sqlite3 sink 2016-03-30 19:11:32 +03:00
Gabi Melman ff2398b6b1 Merge pull request #191 from OSVR/ansi-color-sink-decorator
ANSI color sink decorator
2016-03-30 00:50:11 +03:00
Gabi Melman 418dec1e4b Merge pull request #188 from PedroRod/master
Added SQLite3 sink to the solution
2016-03-28 11:20:57 +03:00
gabime 04b0634b87 mscv_sink rename 2016-03-23 21:44:41 +02:00
gabime becef922c2 add missing include 2016-03-22 01:41:10 +02:00
gabime 36a5f5188e Merge branch 'master' of https://github.com/gabime/spdlog 2016-03-22 00:47:20 +02:00
gabime 79451368cf Fixed issue #179 (Conflict with Boost.Asio) (by defining FMT_USE_WINDOWS_H=0 in format.h and preventing include of windows.h) 2016-03-22 00:46:41 +02:00
PedroRod ea1d0fd37b assigned nullptr to _database and _query_stmt upon flushing so that if flush gets called again, will not throw an exception 2016-03-20 23:13:28 -04:00
PedroRod 26ab30aba5 forgot to reset the null pointer of the bind back to SQLITE_STATIC 2016-03-20 22:07:51 -04:00
PedroRod d8d8dfd3e2 made the prepared statement re-usable and renamed .h to sqlite_sink 2016-03-20 22:02:23 -04:00
PedroRod 571e85d0f4 changed ctrs,variables,argsguments to match code style of spdlog, also removed columns mapping since there is no clean way of set column name dynamically on a prepared statement and changed query to use prepared statements 2016-03-20 19:12:34 -04:00
PedroRod a7011baa53 Added SQLite3 sink to the solution 2016-03-20 11:11:55 -04:00
Kevin M. Godby ee610efd7d Add assignment operator to ansi color sink. Adjust default colors. 2016-03-18 13:13:06 -05:00
Kevin M. Godby e8a669fe0e Remove member initialization because MSVC 2013 doesn't support it. 2016-03-18 11:48:02 -05:00
Kevin M. Godby 1c9f1749d3 Added ANSI color sink. 2016-03-15 20:18:08 -05:00
Alexander Dalshov ea3eef0b5f add msvc logging sink 2016-03-12 19:55:44 +03:00
Kevin M. Godby 077c3095eb Added missing standard header includes. 2016-02-24 22:20:07 -06:00
Kevin M. Godby 196689f720 Fixed header include problems. 2016-02-24 21:26:18 -06:00
Sebastian Messmer 7b8d507615 Allow syslog logger on Mac OS X 2016-02-13 15:50:51 +01:00
gabime e060bbf3ed astyle 2015-12-22 21:44:03 +02:00
Gabi Melman bb32fa1802 Update file_sinks.h
Fixed missing #pragma once
2015-11-29 16:14:15 +02:00
gabime 8c38b4ee9e MIT license 2015-11-28 18:24:20 +02:00
gabime 0f76db880e astyle 2015-11-28 16:52:02 +02:00
Chris Hiszpanski 08f41d4f65 Update syslog_sink.h
Syslog already adds formatting, such as the identifier set with `openlog` in the constructor, the priority, and timestamp -- using the formatted message duplicates this information in the log message. This especially causes problems when the syslog is forwarded to aggregators such as Loggly, Logstash, etc. which can parse log messages which are JSON. However, the duplicated fields which spdlog prepends interfere with this -- better to use `raw` in the syslog case I think, or perhaps add an ability to use custom formatters on individual sinks.
2015-10-21 11:49:35 -07:00
David Schury 2175b00814 Fixed thread unsafe flush method. 2015-09-17 18:58:13 +02:00
David Schury e12c50a8a5 Add distributional sink
Setting up dist_sink to a logger will inject a layer between the logger and
(some of) it's sinks. Sinks can be added and removed to dist_sink dynamically.
2015-09-17 17:01:04 +02:00
Gabi Melman ccc66db7fc Update android_sink.h
Removed redundant check
2015-09-15 01:26:31 +03:00
Ruslan Baratov 8fdd4c3547 Add Android sink 2015-09-14 22:08:35 +03:00
gabime ea1a92769b Fixed rotating_logger_mt does not rotate properly if app restarts #116 2015-08-14 21:16:08 +03: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
Artem Martynovich 8b6df31ec9 Revert to original formatting. 2015-07-14 02:42:50 +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
gnzlbg fbd9d924d6 adds missing flush override to simple_file_sink 2015-05-11 10:17:55 +02:00
gabime 64850dcb0c small style fixes 2015-05-09 16:03:43 +03:00
Denis Ivaykin 63e0012e34 flush in logger 2015-05-09 13:24:01 +02:00
Denis Ivaykin 849b5cb84e flush 2015-05-08 22:57:52 +02:00
gabime 2a0d00929c stdout_loggers now thread safe across all instances (share same stdout_sink_mt) 2015-04-18 01:47:30 +03:00
gabime 31a011e67c Fixed daily sink syntax error and redundant file close 2015-03-12 00:49:28 +02:00
gabime c1dd340a25 Updated cppformat to version 86a7d856fa03fb5ba96f1a27907a4b7171f42e56 and remove spdlog::details namespace from it's source 2015-02-27 11:24:10 +02:00
gabime c401e830d0 Added option for setting rotation time in daily file ctor 2015-02-15 23:28:13 +02:00
gabi b7b421c8fc Added auto flush to stdout & stderr sinks 2015-01-28 23:36:16 +02:00
gabi 7635455c8d Changed "auto_flush" to "force_flush" to better represent the meaning 2015-01-07 12:44:02 +02:00
Felix Gündling 7fd91e5512 include/spdlog/sinks/syslog_sink.h: add missing <array> include (gcc 4.7 complains) 2014-12-24 16:11:20 +01: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
Jens Breitbart 67b633880b Replaced throw() with noexcept and removed some unneeded ';'. 2014-12-20 15:06:36 +01:00
gabime fcd1fc037f append instead of truncate when opening new files 2014-12-19 18:36:45 +02:00
gabime 92f2b7556e syslog improvments 2014-12-19 18:01:49 +02:00
gabime 689960f27c fix syslog bug 2014-12-18 21:38:37 +02:00
fooinha c44ca12d57 Call closelog in syslog sink's destructor 2014-12-18 16:40:57 +00:00
fooinha 375b88c191 Optional arguments for syslog_logger factory. 2014-12-18 15:47:43 +00:00
fooinha 8c9a6fc02c * openlog setup for syslog sink 2014-12-16 15:13:35 +00:00
gabi d817994bd2 Moved namespace fmt to be under spdlog::details to minimize namespace pollution for the users 2014-12-09 00:01:11 +02:00
gabime 52d02af950 using mpmc bounded q for async and many async optimizations 2014-12-05 20:25:04 +02:00
gabi 243dc61e58 async using lockfree queue and bug fixes regarding usage of cppformat 2014-12-02 16:41:12 +02:00
gabime 0e3120ba51 removed include iostream 2014-12-02 02:30:42 +02:00
gabime b0a687c148 astyle 2014-12-02 02:27:11 +02:00
gabime ed17c9a4a9 fixed async_sink to use move instead of unique_ptr 2014-12-02 02:17:39 +02:00
gabi 2c0acf66f9 use cppformat in sinks 2014-11-29 17:10:17 +02:00
gabime 68ee9a7ada replaced flush_interval with auto_flush boolean 2014-11-25 00:23:55 +02:00
Gabi Melman 54b868122d Update async_sink.h 2014-11-24 15:08:53 +02:00
Gabi Melman 94d2556db6 Update last exception moving from worker thread to user thread in async mode 2014-11-24 15:02:43 +02:00
gabi 4cb6aa90b2 New async_logger class and API 2014-11-24 01:29:09 +02:00
gabime ece27ac952 astyle 2014-11-22 10:29:06 +02:00
gabi e2cd9285f4 async_sink user pointers in the q instead of objects in the queue (faster than moving) 2014-11-21 11:17:28 +02:00
gabi fd3f13cd90 revert sink accepting only char* and size_t 2014-11-21 00:48:07 +02:00
gabime a3a8f107a4 revert syslog 2014-11-21 00:46:57 +02:00
gabime c2fc8edfed syslog compile 2014-11-21 00:31:53 +02:00
gabi 66039c7c0e Simplified sink interface - to just accept char* and size_t 2014-11-21 00:13:24 +02:00
gabime a9abfbb005 Fixed rotate bug 2014-11-15 18:42:53 +02:00
Arnaud Kapp 37459ae9f1 Check return code from std::remove.
In case removing a file (file_sink) fails, we throw spdlog_ex.
2014-11-12 23:25:00 +01:00
Gabi Melman 8f24fc5f14 Update syslog_sink.h
Removed un needed includes
2014-11-11 15:44:46 +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
gabi baec3ec1fb patch async_sink 2014-11-07 16:21:17 +02:00
gabi 4bd25f897f async_sink: catch back thread exceptions and rethrow on the calling thread on the next logging request 2014-11-07 16:17:53 +02:00
gabi 4fb55903fa fix in async_sink not to throw in destrcutor in case join failed 2014-11-07 09:43:28 +02:00
gabi ca42657d3c small improvment in async shutdown 2014-11-05 23:15:18 +02:00
gabi 58688d7d1c Removed close() from sink to have RAII semantics 2014-11-05 23:07:20 +02:00
gabime 74aae4f368 readme 2014-11-01 03:20:54 +02:00
gabime e8403e17df astyle 2014-11-01 02:28:49 +02:00
gabi 567e85e6d4 bench 2014-11-01 02:12:12 +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