Michael Eischer
d1a5ec7839
Rename unused testing parameter to _
...
The parameter is an additional marker that the test helper must only be
used for tests.
2023-05-18 21:17:53 +02:00
Michael Eischer
1cb11ad8ad
mount: enable debug logging for the flaky TestMount test
...
The test case fails from time to time with an Input/Output error while
trying to access the snapshots directory.
2023-05-01 18:03:17 +02:00
Michael Eischer
306a29980a
Print stacktrace in SIGINT handler if RESTIC_DEBUG_STACKTRACE_SIGINT set
...
The builtin mechanism to capture a stacktrace in Go is to send a SIGQUIT
to the running process. However, this mechanism is not avaiable on
Windows. Thus, tweak the SIGINT handler to dump a stacktrace if the
environment variable `RESTIC_DEBUG_STACKTRACE_SIGINT` is set.
2023-04-23 15:50:40 +02:00
Michael Eischer
ff7ef5007e
Replace most usages of ioutil with the underlying function
...
The ioutil functions are deprecated since Go 1.17 and only wrap another
library function. Thus directly call the underlying function.
This commit only mechanically replaces the function calls.
2022-12-02 19:36:43 +01:00
Michael Eischer
1ed775e3a8
debug: support roundtripper logging also for release builds
...
Different from debug builds do not use the eofDetectRoundTripper if
logging is disabled.
2022-08-05 23:49:39 +02:00
Michael Eischer
38becfc436
debug: enable debug support for release builds
2022-08-05 23:49:39 +02:00
Michael Eischer
82c268c917
Remove unused hooks mechanism
2022-08-05 23:49:39 +02:00
Michael Eischer
6923353c43
redact swift auth token in debug output
2022-07-02 18:47:35 +02:00
Michael Eischer
0936d864a4
redact http authorization header in debug log output
2022-07-02 18:47:35 +02:00
Michael Eischer
c60540b196
add go:build headers everywhere
2022-03-28 22:23:47 +02:00
greatroar
63be3704d9
Allow debug logging to pipes and terminals
2020-10-19 22:30:30 +02:00
Michael Eischer
07f4e7d10b
Only log HTTP requests when a debug log is configured
...
The logged HTTP requests are only visible when a debug log is
configured.
2020-09-19 17:07:53 +02:00
Michael Eischer
9ad8250a78
Reduce overhead of debug calls if no log is enabled
...
In case no debug log is configured, then calls to debug.Log only incur
the costs to check a single boolean flag making the call really cheap.
2020-09-19 16:45:01 +02:00
Alexander Neumann
0cb241b7d3
Remove build tag `release`
2018-10-11 19:40:38 +02:00
Alexander Neumann
ed99f53786
debug: Auto-shorten IDs passed as parameters
2018-01-25 20:49:26 +01:00
Matthew Dawson
fe33c05a20
debug/log: Add benchmarks for calling the logging function
...
Add some benchmarks for calling Log, both with a static string
along with calling the ID.Str and ID.String functions.
2018-01-23 22:30:00 -05:00
Alexander Neumann
6caeff2408
Run goimports
2017-07-23 14:21:03 +02:00
Alexander Neumann
83d1a46526
Moves files
2017-07-23 14:19:13 +02:00