mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
dill: set verbosity by error tag
This commit is contained in:
parent
442fdc3fe7
commit
f2073dbc34
@ -7,9 +7,8 @@
|
||||
++ gill (pair ship term) :: general contact
|
||||
-- ::
|
||||
=> |% :: console protocol
|
||||
++ all-axle ?(axle) ::
|
||||
++ axle ::
|
||||
$: $0 ::
|
||||
$: $1 ::
|
||||
hey/(unit duct) :: default duct
|
||||
dug/(map duct axon) :: conversations
|
||||
lit/? :: boot in lite mode
|
||||
@ -23,6 +22,9 @@
|
||||
i/(unit mass) ::
|
||||
j/(unit mass) ::
|
||||
== ::
|
||||
$= veb :: vane verbosities
|
||||
$~ (~(put by *(map @tas log-level)) %hole %soft) :: quiet packet crashes
|
||||
(map @tas log-level) ::
|
||||
== ::
|
||||
++ axon :: dill per duct
|
||||
$: ram/term :: console program
|
||||
@ -31,6 +33,7 @@
|
||||
pos/@ud :: cursor position
|
||||
see/(list @c) :: current line
|
||||
== ::
|
||||
+$ log-level ?(%hush %soft %loud) :: none, line, full
|
||||
-- => ::
|
||||
|% :: protocol outward
|
||||
++ mess ::
|
||||
@ -166,12 +169,23 @@
|
||||
::
|
||||
++ crud
|
||||
|= {err/@tas tac/(list tank)}
|
||||
=+ ^= wol ^- wall
|
||||
:- :(weld "%" (trip err) " event failed:")
|
||||
(zing (turn (flop tac) |=(a/tank (~(win re a) [0 wid]))))
|
||||
:: unknown errors default to %loud
|
||||
::
|
||||
=/ lev=log-level (~(gut by veb.all) err %loud)
|
||||
:: apply log level for this error tag
|
||||
::
|
||||
=/ =wall
|
||||
?- lev
|
||||
%hush ~
|
||||
%soft ~["crud: %{(trip err)} event failed"]
|
||||
%loud :- "crud: %{(trip err)} event failed"
|
||||
%- zing
|
||||
%+ turn (flop tac)
|
||||
|=(a=tank (~(win re a) [0 wid]))
|
||||
==
|
||||
|- ^+ +>.^$
|
||||
?~ wol +>.^$
|
||||
$(wol t.wol, +>.^$ (from %out (tuba i.wol)))
|
||||
?~ wall +>.^$
|
||||
$(wall t.wall, +>.^$ (from %out (tuba i.wall)))
|
||||
::
|
||||
++ dump :: pass down to hey
|
||||
|= git/gift:able
|
||||
@ -557,6 +571,11 @@
|
||||
::
|
||||
?: ?=(%vega -.task)
|
||||
[~ ..^$]
|
||||
:: %knob sets a verbosity level for an error tag
|
||||
::
|
||||
?: ?=(%knob -.task)
|
||||
=. veb.all (~(put by veb.all) tag.task level.task)
|
||||
[~ ..^$]
|
||||
::
|
||||
=/ nus (ax hen)
|
||||
?~ nus
|
||||
@ -570,8 +589,8 @@
|
||||
=^ moz all abet:(call:u.nus task)
|
||||
[moz ..^$]
|
||||
::
|
||||
++ load :: trivial
|
||||
|= old/all-axle
|
||||
++ load :: import old state
|
||||
|= old/axle
|
||||
..^$(all old)
|
||||
::
|
||||
++ scry
|
||||
|
@ -2295,6 +2295,7 @@
|
||||
%info `%c
|
||||
%keep `%f
|
||||
%kill `%f
|
||||
%knob `%d
|
||||
%look `%j
|
||||
%listen `%j
|
||||
%merg `%c
|
||||
|
@ -795,6 +795,7 @@
|
||||
{$veer p/@ta q/path r/@t} :: install vane
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
{$verb ~} :: verbose mode
|
||||
[%knob tag=term level=?(%hush %soft %loud)] :: error verbosity
|
||||
== ::
|
||||
-- ::able
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user