def log.if

bend-kit-notch@0.4.0.0 · notch.bend:245

import bend-kit-notch@0.4.0.0/notch.bend as Notch
import Base

245def log.if(on: Bool, lg: Logger, lvl: Level, msg: String, fs: List<&2, Field>) -> IO(Unit):
246  match on:
247    case True{}:
248      do IO<Unit>:
249        s : String <- stamp(lg, lvl, msg, fs)
250        IO.print_err(s)
251    case False{}:
252      IO.pure(Unit, Unit{})

Uses (12)

Used by (1)