Skip to content

Modern Log Emit

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Logging › Logging › Emit

Emit

Sends a finished record straight to every attached sink.

Syntax

Emit( r as LogRecord )

Notes

  • a finished record, to the sinks

Examples

#import "std/logs"
using logs

dim con as ConsoleSink
dim lg as Logger
lg.AddSink( @con )

'' Emit hands a FINISHED record to every sink. It is what .Msg( ) and
'' .Send( ) call underneath, and it is the only place a Logger does I/O.
lg.Info( ).AddText( "stage", "startup" ).Msg( "ready" )

'' A record can also be built and emitted directly
dim r as LogRecord
r.level = LOG_INFO
r.message = "emitted by hand"
lg.Emit( r )

Library: Logging
Category: Logging
Documented under: Members

Clone this wiki locally