mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
Introduce the fish log, a replacement for debug()
This adds a new mechanism for logging, intended to replace debug(). The entry points are FLOG and FLOGF. FLOG can be used to log a sequence of arguments, FLOGF is for printf-style formatted strings. Each call to FLOG and FLOGF requires a category. If logging for a category is not enabled, there is no effect (and arguments are not evaluated). Categories may be enabled on the command line via the -d option.
This commit is contained in:
@@ -22,6 +22,8 @@ The following options are available:
|
||||
|
||||
- ``-d`` or ``--debug-level=DEBUG_LEVEL`` specify the verbosity level of fish. A higher number means higher verbosity. The default level is 1.
|
||||
|
||||
- ``-o`` or ``--debug-output=path`` Specify a file path to receive the debug output. The default is stderr.
|
||||
|
||||
- ``-i`` or ``--interactive`` specify that fish is to run in interactive mode
|
||||
|
||||
- ``-l`` or ``--login`` specify that fish is to run as a login shell
|
||||
@@ -32,6 +34,8 @@ The following options are available:
|
||||
|
||||
- ``--print-rusage-self`` when fish exits, output stats from getrusage
|
||||
|
||||
- ``--print-debug-categories`` outputs the list of debug categories, and then exits.
|
||||
|
||||
- ``-v`` or ``--version`` display version and exit
|
||||
|
||||
- ``-D`` or ``--debug-stack-frames=DEBUG_LEVEL`` specify how many stack frames to display when debug messages are written. The default is zero. A value of 3 or 4 is usually sufficient to gain insight into how a given debug call was reached but you can specify a value up to 128.
|
||||
|
||||
Reference in New Issue
Block a user