aboutsummaryrefslogtreecommitdiff
path: root/src/lib/log/log.h
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-09-23Remove support for old android "logcat" APINick Mathewson
This is apparently obsolete; syslog is modern instead. If users have an android log configured, given them a syslog if we can. Closes #32181.
2020-02-13err/log: Stop closing stderr and stdout during shutdownteor
Closing these file descriptors can hide sanitiser logs. Instead, flush the logs before tor exits, using fsync(). Some Windows environments don't have fsync(), so we check for it at compile time. Fixes bug 33087; bugfix on 0.4.1.6.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-10-22Re-run make autostyle.Nick Mathewson
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22Apparently coccinelle can't handle multiline #errors.Nick Mathewson
2019-10-22Make a pair of add_*_log() functions mockable.Nick Mathewson
2019-10-17Replace add_temp_log() with add_default_log().Nick Mathewson
We used to have this function so that we could mark our initial log-to-stdout as specifically temporary so that we would delete it once regular logs were configured. But it's no longer necessary to mark these logs as temporary, since we now use a mark-and-sweep process to ensure that _all_ not-configured logs are closed when we change our configuration. Instead, this function will be the basis of a refactoring in how we handle default logs.
2019-10-03Merge branch 'tor-github/pr/1377'George Kadianakis
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-30log: Define count, boundary, and all macros for domains and flagsteor
And do static checks on those macro definitions. Part of 31854.
2019-09-25log: Move SEVERITY_MASK_IDX() to log.hteor
Move SEVERITY_MASK_IDX() to log.h private/unit tests section, so that we can use it in log.c, the unit tests, and the fuzzers. (The test and fuzzer code changes are in a subsequent commit.) Preparation for bug 31334.
2019-09-12Merge branch 'tor-github/pr/1303'George Kadianakis
2019-09-09log: Close log and err file descriptors before abortingteor
Part of 31594.
2019-07-19Extract the log_domain_t type to a lower-level headerNick Mathewson
This way, both err and log may depend on it.
2019-07-08Adjust log callback type to use log_domain_mask_tNick Mathewson
2019-07-08Add a compile-time assertion to prevent a recurrence of 31080.Nick Mathewson
2019-07-08Use a 64-bit mask for log domains, and fix a conflictNick Mathewson
When we added LD_MESG, we created a conflict with the LD_NO_MOCK flag. We now need 64 bits for log domains in order to fix this issue. Fixes bug 31080; bugfix on 0.4.1.1-alpha.
2019-07-08Move declaration of LD_NO_MESG to make conflict more apparent.Nick Mathewson
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-23In coverage builds, avoid basic-block complexity in log_debugNick Mathewson
Ordinarily we skip calling log_fn(LOG_DEBUG,...) if debug logging is completely disabled. However, in coverage builds, this means that we get spurious complaints about partially covered basic blocks, in a way that makes our coverage determinism harder to check.
2019-03-26Merge branch 'messaging_v3' into messaging_v3_mergedNick Mathewson
2019-03-25Add a new inline function to check whether debug logging is onNick Mathewson
We already do this in our log_debug() macro, but there are times when we'd like to avoid allocating or precomputing something that we are only going to log if debugging is on.
2019-03-25Add MESG as a new log domain.Nick Mathewson
2019-03-12Fix all nonconformant headers' guard macros.Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-12-20Add LD_BTRACK log domain for bootstrap trackerTaylor Yu
Part of ticket 27167.
2018-12-17Add "PT" log domain.Alexander Færøy
See: https://bugs.torproject.org/28179
2018-11-27Add LD_PROCESS as log domain.Alexander Færøy
See: https://bugs.torproject.org/28179
2018-07-10Rename torlog.[ch] to log.[ch]Nick Mathewson
Fun fact: these files used to be called log.[ch] until we ran into conflicts with systems having a log.h file. But now that we always include "lib/log/log.h", we should be fine.