aboutsummaryrefslogtreecommitdiff
path: root/src/lib/log
AgeCommit message (Collapse)Author
2019-10-02log: fix a typo in the function comment for log_fn_()teor
Closes 31923.
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-30Merge branch 'tor-github/pr/1302'George Kadianakis
2019-09-30Merge branch 'tor-github/pr/1356'George Kadianakis
2019-09-30Merge branch 'tor-github/pr/1339'George Kadianakis
2019-09-26Run "make autostyle" with new "annotate_ifdef_directives"Nick Mathewson
2019-09-26log: explain why it is safe to leave the log mutex initializedteor
The log mutex is dynamically initialized, guarded by log_mutex_initialized. We don't want to destroy it, because after it is destroyed, we won't see any more logs. If tor is re-initialized, log_mutex_initialized will still be 1. So we won't trigger any undefined behaviour by trying to re-initialize the log mutex. Part of 31736, but committed in this branch to avoid merge conflicts.
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-24log: Improve the documentation for tor_log_update_sigsafe_err_fds()teor
Part of 31839.
2019-09-12Merge branch 'tor-github/pr/1303'George Kadianakis
2019-09-10Merge branch 'bug31615_041' into bug31615_masterteor
Merged modified lines from bug31615_041, and unmodified lines from master.
2019-09-10Merge branch 'bug31615_040' into bug31615_041teor
Merged modified lines from bug31615_040, and unmodified lines from maint-0.4.1.
2019-09-09log: Close log and err file descriptors before abortingteor
Part of 31594.
2019-09-09log: Don't close file log fds that are being used by the err moduleteor
Instead, dup() file log fds, before passing them to the err module. Closes 31613, part of 31594.
2019-09-06subsys: Make the subsystem init order match the module dependenciesteor
Fix levels for subsystems that depend on log/err * winprocess (security) doesn't use err: * call windows process security APIs as early as possible * init err after winprocess * move wallclock so it's still after err * network and time depend on log: * make sure that network and time can use logging. * init network and time after log Add comments explaining the module init order. Fixes bug 31615; bugfix on 0.4.0.1-alpha.
2019-08-19Fix 64-bit return issue in parse_log_domain()Nick Mathewson
If unsigned int is 32-bits long, then our old code would give a wrong result with any log domain whose mask was >= (1<<32). Fortunately, there are no such log domains right now: the domain mask is only 64 bits long to accommodate some flags. Found by coverity as CID 1452041. Fixes bug 31451; bugfix on 0.4.1.4-rc.
2019-07-24Fix clang-detected errors related to log_domain_mask_tNick Mathewson
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-05Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0Nick 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-05-03Merge branch 'tor-github/pr/954'David Goulet
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2019-04-15Fix assertf() issues when ALL_BUGS_ARE_FATAL is defined.Nick Mathewson
Fix from Gisle Vanem; fixes bug 30179. Bug not in any released version of Tor.
2019-04-15Merge branch 'bug30189_035' into bug30189_041Nick Mathewson
2019-04-15Use a tor_abort_() wrapper in our util_bug.h macrosNick Mathewson
Previously, our use of abort() would break anywhere that we didn't include stdlib.h. This was especially troublesome in case where tor_assert_nonfatal() was used with ALL_BUGS_ARE_FATAL, since that one seldom gets tested. As an alternative, we could have just made this header include stdlib.h. But that seems bloaty. Fixes bug 30189; bugfix on 0.3.4.1-alpha.
2019-03-30bug_occurred: a place where we assumed that "buf" was still a bufferNick Mathewson
In 9c132a5f9e87a2cd0f we replaced "buf" with a pointer and replaced one instance of snprintf with asprintf -- but there was still one snprintf left over, being crashy. Fixes bug 29967; bug not in any released Tor. This is CID 1444262.
2019-03-29Merge branch 'ticket29662_squashed' into ticket29662_squashed_mergedNick Mathewson
2019-03-29Check for NULL in tor_assertf_nonfatal()rl1987
2019-03-29Refrain from using static buffer for assert failure message; call ↵rl1987
tor_asprintf() instead
2019-03-29Silence compiler warningsrl1987
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-03-05Also add tor_assertf_nonfatal()rl1987
2019-03-05Introduce tor_assertf() to allow logging extra error message on assert failurerl1987
With format string support!
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick 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-11-09Rename subsystem callback functions to make them consistentNick Mathewson
2018-11-05Turn the logging code into a subsystemNick Mathewson
2018-11-05Move the code that knows our tor version into a lowest-level libNick Mathewson
2018-10-15Merge branch 'maint-0.3.4'Nick Mathewson