Commit Graph

2880 Commits (e3699070a494edc7592809e76d5fad8ecefdc14c)
 

Author SHA1 Message Date
gabime e3699070a4 clang-format 6 years ago
gabime bf40855825 Micro-optimize level checking by inlining 6 years ago
gabime 3ee4f2810d Micro-optimze log_it_ 6 years ago
gabime 79468cf676 Micro-optimze log_it_ 6 years ago
gabime 4037942a26 suppress modernize-use-trailing-return-type fron clang-tidy 6 years ago
gabime cae6c9ab36 Removed lazy argument evaluation from macros 6 years ago
gabime 15b393193a Replaced a forgotten try with SPDLOG_TRY 6 years ago
Gabi Melman 53ab34928c
Merge pull request #1294 from pck/refmacro
Improve log macros
6 years ago
Paul Kunysch eb4a169cfb Improve log macros 6 years ago
Gabi Melman 6f6cadf31d
Merge pull request #1292 from jktjkt/journald
improve systemd journald support
6 years ago
Jan Kundrát 17513a6dce journald: structured output for logger's name
Previously, the logger name was effectively lost. There were two choices
on how to add it:

- Via a formatter, which would mean that `journalctl` would not be able
to filter against that. That would be suboptimal.

- As a "syslog identifier". This means that `journalctl` will, by
default, stop showing the daemon's executable name and replace that via
the logger name. The PID is still shown, and if one would like to go
back to the previous behavior, it is still possible via `journalctl -o
with-unit`.

I think that the second option is strictly better than the first one.

fixes #1289
6 years ago
Jan Kundrát a44560ddb6 journald: fix source file location
This is what my manpage says, and what the original blog post [1] says
as well.

Also, `sd_journal_send` can add the location of its own invocation to
the log. That's typically not what we want, so we have to suppress that
feature and instead put whatever is inside the spdlog message into the
journal.

[1] http://0pointer.de/blog/projects/journal-submit.html
6 years ago
gabime 2b8afb38b7 Revert pull #1288 6 years ago
Gabi Melman 685ad74d53
Merge pull request #1288 from yipdw/bugfix/use-64-bit-file-access
Use _FILE_OFFSET_BITS=64 when building on Linux 32-bit systems
6 years ago
David Yip 288ea11534 Use _FILE_OFFSET_BITS=64 when building tests on Linux 32-bit systems
When cross-compiling spdlog from x86-64 to armhf, I ran spdlog-utests
via qemu-arm and noticed that the "daily_logger rotate" test was failing
because count_files always returned zero.

Investigation of count_files revealed that readdir was returning nullptr
immediately and setting errno to 75, i.e. "value too large for defined
data type".  I suspected this had something to do with some 64 vs.
32-bit thing, so I added _FILE_OFFSET_BITS=64 to the build and that
seems to have made readdir happy.

It might be safe to add _FILE_OFFSET_BITS=64 for all Linux builds, but
it only seems to be necessary for the 32-bit case (which is a pretty
small audience these days -- I'm only building for armhf to target a
Raspberry Pi 3 running Raspbian, which runs in 32-bit mode).
6 years ago
Gabi Melman b848ff8db9
Merge pull request #1285 from masmullin2000/v1.x
Remove unused variable
6 years ago
Michael Mullin 5881fcb0d6 Remove unused variable 6 years ago
Gabi Melman 491a2e8732
Update os-inl.h 6 years ago
gabime 4a620a2c5e Merge branch 'Issue-1248' into v1.x 6 years ago
gabime 05105155f8 refactoed file_helper 6 years ago
gabime 9f96545fa7 refactoed file_helper 6 years ago
gabime 0c60107e62 refactoed file_helper 6 years ago
gabime 49eb9cbdd8 Removed junk folder 6 years ago
gabime 594d226056 update tests 6 years ago
gabime aac7dccf45 comment 6 years ago
gabime c19e325b83 Added some tests for create_dir 6 years ago
gabime bd92c23add comment 6 years ago
gabime 88335bd92e clang-format 6 years ago
gabime a4602021d8 Renamed private members of file_helper 6 years ago
gabime dbe5c17a96 Renamed file_exists()->path_exists() 6 years ago
gabime c40555c0ac clang-format 6 years ago
gabime bfc76278a9 update tests 6 years ago
gabime a1f283946e updated os::dir_name and tests 6 years ago
gabime 066087b383 Update create_dir 6 years ago
gabime e9d42e059f // support forward slash in windows 6 years ago
Gabi Melman d1dadc9814
Merge pull request #1283 from bencsikandrei/refactor/cmake-minor-duplication-removal
Minor cmake code duplication improvement
6 years ago
Andrei-Florin BENCSIK 2cc620ef33 Function instead of macro
Be more consistent with the existing code and with the naming
_function -> function
6 years ago
Andrei-Florin BENCSIK cee705ccd3 Minor cmake code duplication improvement
Create a macro to add tests for both static/header only.

The only differneces between these two are the libraries they link
with and the target names. Created the simple macro:

_spdlog_prepare_test(<target> <spdlog_lib>)

which does the work.

Signed-off-by: Andrei-Florin BENCSIK <andrei.bencsik@gmail.com>
6 years ago
gabime a8f72424db Merge branch 'Issue-1248' of https://github.com/gabime/spdlog into Issue-1248 6 years ago
gabime 31ed133932 Added dir_name tests 6 years ago
Gabi Melman d3c6974e99
Update os.h 6 years ago
Gabi Melman 1271081865
Update os-inl.h 6 years ago
Gabi Melman 8a638a95a0
Update os-inl.h 6 years ago
Gabi Melman d9f726f2a5
Add global namespace qualifiers to global function calls in os-inl.h 6 years ago
Gabi Melman 5f3521b3d4
Update utils.cpp 6 years ago
gabime 9a68bd8cc8 Fixed missing include 6 years ago
gabime 9b7812a0f2 auto create log dir 6 years ago
gabime 4858d7e454 Fix #1274 6 years ago
gabime fbb3f41dff Fix #1273 6 years ago
Gabi Melman 1472048b97
Merge pull request #1275 from flopp/spelling
Fix some spelling errors.
6 years ago