Skip to main content

Module DevLog

Module DevLog 

Source
Expand description

Tag-filtered development logging (LAND_DEV_LOG env var). Must be declared before WindServiceHandlers so the dev_log! macro is available.

§DevLog - Tag-filtered development logging

Controlled by LAND_DEV_LOG environment variable. The same tags work in both Mountain (Rust) and Wind/Sky (TypeScript).

§Usage

LAND_DEV_LOG=vfs,ipc ./Mountain          # only VFS + IPC
LAND_DEV_LOG=all ./Mountain              # everything
LAND_DEV_LOG=short ./Mountain            # everything, compressed + deduped
LAND_DEV_LOG=terminal,exthost ./Mountain # terminal + extension host
./Mountain                               # nothing (only normal log!() output)

§Short Mode

LAND_DEV_LOG=short enables all tags but compresses output:

  • Long app-data paths aliased to $APP
  • Consecutive duplicate messages counted ((x14) suffix)
  • Rust log targets compressed (D::Binary::Main::EntryEntry)

§Tags (38 granular tags across all Elements)

TagScope
vfsFile stat, read, write, readdir, mkdir, delete, copy
ipcIPC routing: invoke dispatch, channel calls
configConfiguration get/set, env paths, workbench config
lifecycleStartup, shutdown, phases, window events
storageStorage get/set/delete, items, optimize
folderFolder picker, workspace navigation
exthostExtension host: create, start, kill, exit info
extensionsExtension scanning, activation, management
terminalTerminal/PTY: create, sendText, profiles, shell
searchSearch: findFiles, findInFiles
themesTheme: list, get active, set
windowWindow: focus, maximize, minimize, fullscreen
nativehostOS integration: process, devtools, shell
clipboardClipboard: read/write text, buffer, image
commandsCommand registry: execute, getAll
modelText model: open, close, get, updateContent
outputOutput channels: create, append, show
notificationNotifications: show, progress
progressProgress: begin, end, report
quickinputQuick input: showQuickPick, showInputBox
workingcopyWorking copy: dirty state
workspacesWorkspace: folders, recent, enter
keybindingKeybindings: add, remove, lookup
labelLabel service: getBase, getUri
historyNavigation history: push, goBack, goForward
decorationsDecorations: get, set, clear
textfileText file operations: read, write, save
updateUpdate service: check, download, apply
encryptionEncryption: encrypt, decrypt
menubarMenubar updates
urlURL handler: registerExternalUriOpener
grpcgRPC/Vine: server, client, connections
cocoonCocoon sidecar: spawn, health, handshake
bootstrapEffect-TS bootstrap stages
preloadPreload: globals, polyfills, ipcRenderer

Structs§

DedupState

Statics§

APP_DATA_PREFIX 🔒
DEDUP
ENABLED_TAGS 🔒
OTLP_AVAILABLE 🔒
OTLP_TRACE_ID 🔒
SHORT_MODE 🔒

Functions§

AliasPath
Replace the long app-data path with $APP in a string.
AppDataPrefix
Get the app-data path prefix for aliasing (cached).
DetectAppDataPrefix 🔒
EmitOTLPSpan
Emit an OTLP span to the local collector (Jaeger at 127.0.0.1:4318). Fire-and-forget on a background thread. Stops trying after first failure.
EnabledTags 🔒
FlushDedup
Flush the dedup buffer - prints the pending count if > 1.
GetTraceId 🔒
IsEnabled
Check if a tag is enabled.
IsShort
Whether LAND_DEV_LOG=short is active.
NowNano
rand_u64 🔒