Commit Graph

58 Commits

Author SHA1 Message Date
gabime f5492aed12 Unified usage of fmt::memory_buffer across the codebase 2019-08-28 18:46:09 +03:00
gabime 81e82fb2d3 Rename func name wincolor sink 2019-07-15 12:22:34 +03:00
gabime 05cac05c06 clang_format 2019-07-14 18:35:59 +03:00
gabime 72f3d5291c Fix issue #1147 2019-07-14 18:32:24 +03:00
gabime c138685364 Fix issue #1147 2019-07-14 18:31:58 +03:00
gabime 29f2eeea31 Removed formatter_ member from the sink interface 2019-06-27 23:56:37 +03:00
gabime 78c833a09f clang-format 2019-06-18 17:05:27 +03:00
gabime 99e519cf0f Simplify color sinks 2019-06-18 12:32:51 +03:00
gabime bcfa9241b8 Updated copyright headers 2019-06-04 00:09:16 +03:00
gabime 78eeba940a Fix issue #114 2019-06-03 23:20:53 +03:00
gabime 7a3a560c44 Merge v1.x 2019-05-24 12:33:14 +03:00
gabime d5c9bac3c7 wip static-lib 2019-05-12 23:08:14 +03:00
gabime 8b4eedb594 More template instantiations for static lib 2019-05-12 16:11:35 +03:00
gabime 01f5efa1d9 Added wincolor sink to static build 2019-05-12 15:32:54 +03:00
gabime 46ef71e3ec Normalized copyright message 2019-05-11 20:06:17 +03:00
Gabi Melman e504aceeb5
Update wincolor_sink.h 2019-05-10 17:59:48 +03:00
gabime 3ce9ac74a6 Mutex protect set_color_mode() 2019-05-10 17:41:21 +03:00
Philip Salzmann 5e856c6b4d Add mode enum to control output of color sinks
This adds a new "color_mode" enum that can be used to control the color
code output behavior of sinks with color support. It can be one of three
values: always, automatic and never.
2019-05-10 09:47:16 +02:00
gabime 23fdc0eae4 Fixed issue #959 2019-01-17 17:09:35 +02:00
gabime b368d18b0f Added default logger API 2018-10-12 03:04:55 +03:00
gabime 5cd24f3033 Replaced SPDLOG_FINAL macro with final 2018-09-26 15:26:27 +03:00
gabime 9e4925eff0 clang format 2018-07-21 23:48:07 +03:00
gabime c2a49080aa Refactored sink interface and base_sink 2018-07-14 16:21:53 +03:00
gabime 9dc44c39e7 Fixed bugs in stdout_sinks and in msvc 2018-07-07 14:04:31 +03:00
gabime bde4c7149f Renamed traits to console globals 2018-07-07 13:38:15 +03:00
gabime 87e013534c wincolor sink fix 2018-06-25 16:32:22 +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 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 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 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 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
Daniel Chabrowski 0c94ce0039 deleted copy op and a little format 2018-02-25 03:35:20 +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
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
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
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