aboutsummaryrefslogtreecommitdiff
path: root/src/lib/log
AgeCommit message (Collapse)Author
2024-04-14rename metric bug_reached to bug_reached_counttrinity-1686a
2024-04-13also consider LD_BUG logs when counting bug reachedtrinity-1686a
2023-09-12add metrics counter for BUG() reachedtrinity-1686a
2021-03-12Run "make autostyle" in advance of new series.Nick Mathewson
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-01-19Merge branch 'maint-0.4.4' into maint-0.4.5Nick Mathewson
2021-01-19Merge branch 'maint-0.4.3' into maint-0.4.4Nick Mathewson
2021-01-19Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson
2021-01-13Better fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)Nick Mathewson
This one should work on GCC _and_ on Clang. The previous version made Clang happier by not having unreachable "fallthrough" statements, but made GCC sad because GCC didn't think that the unconditional failures were really unconditional, and therefore _wanted_ a FALLTHROUGH. This patch adds a FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL macro that seems to please both GCC and Clang in this case: ordinarily it is a FALLTHROUGH, but when ALL_BUGS_ARE_FATAL is defined, it's an abort(). Fixes bug 40241 again. Bugfix on earlier fix for 40241, which was merged into maint-0.3.5 and forward, and released in 0.4.5.3-rc.
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
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-08-04Improve ratelimit message to list true interval.Nick Mathewson
Previous message would say "N messages in the last T seconds", but would give an inaccurate number for N. We now give an accurate number, rounded up to the nearest 60 seconds. Closes #19431.
2020-07-14doc: Move manpages into doc/man/David Goulet
Closes #40044 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-29log/util_bug: Make IF_BUG_ONCE() support ALL_BUGS_ARE_FATALteor
... and DISABLE_ASSERTS_IN_UNIT_TESTS. Make all of tor's assertion macros support the ALL_BUGS_ARE_FATAL and DISABLE_ASSERTS_IN_UNIT_TESTS debugging modes. Implements these modes for IF_BUG_ONCE(). (It used to log a non-fatal warning, regardless of the debugging mode.) Fixes bug 33917; bugfix on 0.2.9.1-alpha.
2020-03-26Add a SUBSYS_DECLARE_LOCATION() to every subsystem.Nick Mathewson
2020-03-09Merge branch 'tor-github/pr/1723'David Goulet
2020-02-13Run "make autostyle"teor
But only take the changes that were caused by the rest of the 33087 branch. Part of 33087.
2020-02-13log: Stop duplicating error file fdsteor
Since we're not closing these fds, they don't need to be duplicated any more. Cleanup after 33087.
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-02-06Fix a couple more long warning linesNick Mathewson
These are not a problem with 2-space indentation, but cocci will start getting confused when clang-format wraps them with 4-space indentation.
2020-02-06Remove senseless CHECK_PRINTF()s from util_bug.cNick Mathewson
These belong in util_bug.h (and they already are there). Their presence made clang-format misindent these functions in a way that checkSpace.pl dislikes.
2020-01-30Merge branch 'tor-github/pr/1697'David Goulet
2020-01-30Do not set "once" when calling tor_bug_occurred_ from BUG().Nick Mathewson
The "once" flag makes tor_bug_occurred_() say that future instances of the warning will be suppressed -- but that's not something that BUG() does. Fixes bug 33095; bugfix on 0.4.1.1-alpha.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2020-01-06Merge branch 'maint-0.4.2'Nick Mathewson
2019-12-16Merge branch 'bug32765_041' into bug32771_042Nick Mathewson
2019-12-16Use CHECK_PRINTF() for printf-like functions in util_bug.hNick Mathewson
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-04Doxygen: use \refdir everywhere.Nick Mathewson
This commit was generated with: find src -name '*.dox' |xargs perl -i -pe 's{\\ref src/(\S+) \"\S+}{\\refdir{$1}};'
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04doxygen: Take "lib" descriptions from doc/HACKING/design.Nick Mathewson
This commit takes descriptions for src/lib and moves them into our doxygen hierarchy. I've covered everything from lib/cc through lib/sandbox here.
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-10-22Merge remote-tracking branch 'tor-github/pr/1303' into maint-0.4.1Nick Mathewson
2019-10-22Merge remote-tracking branch 'tor-github/pr/1302' into maint-0.4.1Nick 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-22ratelim.h: use COCCI to hide an initializer.Nick Mathewson
2019-10-22util_bug.h: Coccinelle does not understand IF_BUG_ONCE or #nodef.Nick Mathewson
2019-10-22Apparently coccinelle can't handle multiline #errors.Nick Mathewson
2019-10-22Use #warning instead of #warn: one is C and one isn't.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-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-30log: When initialising log domain masks, only set known log domainsteor
And add a runtime test that checks for unknown domains and flags. Fixes bug 31854; bugfix on 0.2.1.1-alpha.
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-30log: Remove duplicate code and an outdated commentteor
Preparation for 31854.
2019-09-30Merge branch 'tor-github/pr/1302'George Kadianakis