~/bend-docscommunity

src/dev/conlog.bend checks

raw source on the hub · import 0x2740e30df705f4fb9b9db637023eca00/src/dev/conlog.bend as Conlog

2 imports
import Base
import ../lib/u64.bend as U

Types

type Rename source · line 18 · raw

Data

A rotation's renames, in order (keep N): PATH.(N-1) to PATH.N, ..., PATH.1 to PATH.2, then PATH to PATH.1; with keep 0, none (the log starts over). The host then opens a new, empty PATH (Hvf.console_reopen). A rename that fails (no such file yet) is no error.

Definitions

def Log.rotate source · line 11 · raw

@+size:0x2740e30df705f4fb9b9db637023eca00/src/lib/u64.U64 -> @+max:0x2740e30df705f4fb9b9db637023eca00/src/lib/u64.U64 -> Bool

Whether the log of size bytes rotates (max 0: never).

def Log.name source · line 21 · raw

@+path:String -> @+i:U32 -> String

def Log.nat source · line 24 · raw

@bits:Nat -> @+x:U32 -> Nat

def Log.moves.go source · line 32 · raw

@n:Nat -> @+path:String -> List<&1, Rename>

The renames of the numbered logs, from PATH.n up (n down to 1).

def Log.moves.of source · line 40 · raw

@n:Nat -> @+path:String -> List<&1, Rename>

def Log.moves source · line 48 · raw

@+path:String -> @+keep:U32 -> List<&1, Rename>

(keep is at most 99: Cli.conlog.)

def Out.batch_us source · line 55 · raw

U32

Console output on stdout (the host's flusher writes it): output waits at most batch_us so a guest printing byte by byte costs no write per byte, and past backlog bytes waiting (nobody draining stdout: a stalled pipe) more is dropped rather than growing the VMM without bound.

def Out.backlog source · line 58 · raw

U32