Commit Graph

152 Commits

Author SHA1 Message Date
Joao Moreno
a938045135 use Sleep in Windows instead of sleep_for
fixes #609
2018-01-11 14:50:47 +01:00
gabime
3c4a2bf531 Handle file extensions in rotating and daily loggers 2017-12-01 03:40:49 +02:00
gabime
799ba2a57b added SPDLOG_DISABLE_TID_CACHING macro to prevent invalid thread ids after fork 2017-11-26 00:40:47 +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
93be7713e0 astyle 2017-11-06 12:39:04 +02:00
gabime
f70b2ef3b8 Fixed cygwin support 2017-11-05 01:17:21 +02:00
sheldonlyr
66a2c4993b More meaningful thread id for OSX 2017-06-24 15:38:18 +08:00
Tennn
f8d509d010 Fixed issues 449
Please check it
2017-05-21 17:44:44 +08:00
gabime
6cc7e7382e astyle 2017-05-21 01:56:56 +03:00
gabime
40fc5becff fixed compilation 2017-05-21 01:56:41 +03:00
gabime
98addad888 Disable colors if terminal no attached and simplfy ansicolor_sink 2017-05-21 01:36:03 +03:00
Elias Kosunen
c6c5a46560 Fix OSX builds of details/os.h 2017-05-17 21:14:39 +03:00
gabime
def86e6e20 Fixed forgotten inline keyword 2017-05-17 00:17:46 +03:00
gabime
1d6842f0f9 bugfix in color detection and astyle 2017-05-17 00:06:11 +03:00
gabime
eb92cc35df Merge branch 'master' of https://github.com/gabime/spdlog.git 2017-05-17 00:01:52 +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
Barrett
84a4f56eae Allow compiler to select an strerror_r stringify
On Alpine (and potentially other systems) that don't identify their runtime correctly there is an issue with the string conversion
Specifically, alpine linux and musl where the errno_to_string is incorrectly called.
To fix this I have added two overloaded functions and use auto err to allow the compiler to detect the actual types returned and call the correct method for conversion
2017-05-09 18:31:44 -07:00
odeits
ea359254d6 Fix typo Unkown to Unknown 2017-03-29 15:53:14 -04:00
gabime
2d873785a5 astyle 2016-12-10 02:05:05 +02:00
gabime
92db8115b7 option to prevent child processes from inheriting log file desciptors (#define SPDLOG_PREVENT_CHILD_FD) 2016-12-10 01:43:43 +02:00
Gabi Melman
af35f9c086 Merge pull request #330 from PMExtra/master
Use the feature checking macros to detect thread_local support in clang.
2016-12-09 21:47:58 +02:00
Gabi Melman
0e016882d9 Update os.h 2016-12-06 19:47:33 +02:00
PM_Extra
b1a55ca3a4 Use the feature checking macros to detect thread_local support in clang. 2016-12-04 13:42:52 +08:00
PM_Extra
f7574eb4c7 fixed compilation error in clang before version 8 (does not support thread_local keyword) 2016-12-03 01:40:52 +08:00
gabime
33494049a8 fixed compilation error in 2013 (does not support thread_local keyword) 2016-12-02 17:48:10 +02:00
gabime
5d23e88c16 astyle 2016-12-02 17:40:40 +02:00
gabime
6d8efa8d7f store thread_id in tls 2016-12-02 17:33:49 +02:00
gabime
343904b56d add missing include to widnows _getpid 2016-12-02 17:12:24 +02:00
gabime
cf73f02eaf pid support (added the %P option to formatter) 2016-12-02 17:09:00 +02:00
gabime
e12916c070 Fixed issue #317 (Build error on raspberry pi) 2016-11-18 16:58:57 +02:00
osx2000
3cd497ee95 extended conditional compilation to __SUNPRO_CC 2016-11-11 14:28:45 +01:00
Guo Xiao
9b218d4d12 Convert off_t to size_t 2016-10-09 15:36:19 +08:00
amir zamani
811eeef7a6 update os.h to fix filesize() on older win32
_fstat() always fails under older 32bit WinXP/Win2003 targets.

_filelength() just works for both WinXP SDK and later Win7+ 32bit targets.
2016-09-20 14:13:15 +04:30
Hugh Wang
f2c9692438 Fix compilation on Android. 2016-09-14 17:37:06 +08: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
gabime
e556daebc3 better support for thread id in FreeBSD 2016-08-21 01:36:27 +03:00
gabime
e7debaacd7 astyle 2016-08-05 04:43:20 +03:00
Tony Narlock
98af71c585 Add FreeBSD compatibility defs
fix some linux-isms for spdlog on freebsd systems

- FreeBSD uses plain-old ``stat`` (not ``stat64``)
- ``errno_str``'s else requires GNU extensions, not available by default
  on FreeBSD. The one used by apple systems is most correct
2016-08-01 00:19:35 -05:00
gabime
36ba06a75c cosmetic fix in utc_minutes_offset when throwing 2016-07-31 01:52:22 +03:00
gabime
74aede0c66 better support for file size in 64 bits 2016-07-31 01:47:55 +03:00
gabime
730f0e02a6 better support for file sizes in 32/64 bits 2016-07-30 19:32:51 +03:00
gabime
b2c40fcedf Fixed issue #156 (use stat to check file existance under osx as well( 2016-07-30 18:23:55 +03:00
Gabi Melman
28ebdad367 Update os.h
fixed issue #246
2016-07-21 12:29:59 +03:00
gabime
1ac68e399a Fixed issue #245 2016-07-18 22:29:26 +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
Gabi Melman
5202a7806f Merge pull request #210 from GreatFruitOmsk/master
Fix throwing exception if DYNAMIC_TIME_ZONE_INFORMATION fails
2016-05-16 10:13:14 +03: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
gabime
10d5292bbb better support for custom eol 2016-05-15 00:53:35 +03:00
Kirill Leyfer
6603d5e31f Fix throwing exception if DYNAMIC_TIME_ZONE_INFORMATION fails under windows. 2016-05-13 15:46:10 +06:00
gabime
0d26359856 astyle 2016-04-20 11:57:49 +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
12f6fd07e0 formatting 2016-03-30 18:47:56 +03:00
gabime
cd90e3911e fix issue #189 spdlog redefines max as a preprocessor macro 2016-03-30 18:46:25 +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
gabime
c7864ae5dc throw exception if DYNAMIC_TIME_ZONE_INFORMATION fails under windows instead of returning -1 2016-01-06 21:30:42 +02:00
Andrey Glebov
04ce6e5feb - fixed false error (returning -1) in time zones without daylight saving (checking against TIME_ZONE_ID_INVALID instead of 0)
- accounts for daylight saving only when tm::tm_isdst is true
- accounts for standard time offset ([DYNAMIC_]TIME_ZONE_INFORMATION::StandardBias) in time zones that need it
2016-01-06 19:57:00 +03:00
gabime
a1e25cdb28 revert support for monotonic clock - it is not faster than realtime 2015-12-22 21:40:27 +02:00
Sergey Kovalevich
583ca02ef9 Added CLOCK_MONOTONIC trick 2015-12-22 00:20:15 +03:00
gabime
d7f1932e10 cygwin/mingw support fix 2015-12-13 12:29:19 +02:00
gabime
d58432ff56 bugfix 2015-12-12 20:56:14 +02:00
gabime
a9fb96e088 1. Fixed file_helper::exists() bug under windows which returned false in some circumstances
2. Improved file_helper::exists() performance under linux to use stat sys call
3. Added unit tests
2015-12-12 20:53:00 +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
yaoyuan1216
1b3946cf65 Replace GetDynamicTimeZoneInformation to GetTimeZoneInformation. 2015-11-20 16:25:33 +08:00
Alexander Shishenko
0170dfdc7b
Renamed "Windows.h" to "windows.h" for building spdlog on MinGW using case-sensitive file system. 2015-10-25 04:11:23 +03:00
Ruslan Baratov
8bb4b831c4 Fix Android build 2015-09-10 21:01:55 +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
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
285a47dedb Fix bug #84 2015-04-28 01:23:15 +03:00
gabime
da8024854e Fixe bug #84 (mingw gives '_SH_DENYWR' was not declared in this scope') 2015-04-28 01:13:33 +03:00
gabime
3ee728d11b replaced include pthread.h with <thread> 2015-04-09 18:20:45 +03:00
gabime
b715378ff5 Added tweakme.h - enable users to enable/disable features at compile time 2015-04-09 18:05:16 +03:00
gabime
7cf34ce820 Fixed return type in os::get_thread_id 2015-04-08 10:55:25 +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
4292d3d9af Use gettid() syscall under linux to get thread id 2015-04-07 21:02:34 +03:00
gabime
a09107927b Fix Visual Studio poor std::this_thread::get_id() performance by using GetCurrentThreadId() (and pthread_self() under linux) 2015-04-07 20:26:42 +03:00
gabime
2fe68db0a3 pass nullptr to time() instead of 0 2015-02-09 23:47:51 +02:00
gabime
1323d18f9e bugfix 2015-01-29 00:21:34 +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
Rupert Steel
5d7947df9d Fixed 2 macro redefinition warnings releated to WIN32_LEAN_AND_MEAN. 2015-01-12 16:17:55 +13:00
gabime
40a55b8e34 astyle 2014-12-21 02:47:04 +02:00
gabime
d163b8c45a astyle 2014-12-21 02:42:37 +02:00
gabime
7674bdb40a undo last commit 2014-12-19 21:36:11 +02:00
gabime
d00070da5d undo last commit 2014-12-19 21:35:43 +02:00
gabime
e9dc0d2196 #undef WIN32_LEAN_AND_MEAN if it was not dedfined before spdlog defined it 2014-12-19 21:31:37 +02:00
gabime
e87af08180 some small cleanup and define WIN32_LEAN_AND_MEAN 2014-12-19 18:44:17 +02:00
Gabi Melman
87c0770c42 Update os.h
Provide shared read access to log files under windows
2014-11-24 14:18:29 +02:00
gabime
6f550c3271 glog bench 2014-11-23 00:24:46 +02:00
gabime
eeeca0f46b static_cast<int> to remove warning 2014-11-07 20:32:17 +02:00
gabi
0c6518961d Fix level 4 warnings under VS 2014-11-05 01:47:28 +02:00