17-stats-logok
Structure
importstats:lib/stats.mq.mdlog:lib/log.mq.md
fn · h1Closing Mid2 sugar
comment
fn · h1main
bind
`xs` = [10, 20, 30]bind
`m` = > stats.mean list=`xs`call
> print text=`m`bind
`fld` = {step: done, status: ok}call
> log.info text=mid2-m10 fields=`fld`Functions
Variables
-
fld map · 2
step done status ok key value step done status ok -
m num2020
-
xs list · 3
# value 1 10 2 20 3 30 # value 1 10 2 20 3 30
Execution
20
INFO mid2-m10 step=done status=ok
Source
--- title: Mid stdlib — stats and log fields description: Thin mean/median/stdev + structured log fields (Mid2 M10) import stats:lib/stats.mq.md import log:lib/log.mq.md --- # Closing Mid2 sugar Light statistics and optional `fields=` on log lines — no remote sinks, no dataframes. # main `xs` = | | |---| | 10 | | 20 | | 30 | **m = > stats.mean list=`xs`** > print text=`m` `fld` = | step | status | |------|--------| | done | ok | > log.info text="mid2-m10" fields=`fld`
Light statistics and optional
fields=on log lines — no remote sinks, no dataframes.