Skip to content

Modern Log LogEvent Render

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

Home › Logging › Logging › TextRenderer.Render

TextRenderer.Render

Appends a record as one line of text to a buffer, without clearing it first.

Syntax

Render( r, byref outbuf as ustring )

Notes

  • APPENDS, and does not clear

Examples

#import "std/logs"
using logs

'' Render is the Renderer side: it turns a LogRecord into text and
'' appends it to a buffer, without doing any I/O itself. That split is
'' what lets one sink write what another renders.
dim tr as TextRenderer
dim out_ as ustring

dim r as LogRecord
r.level = LOG_INFO
r.message = "hello"

tr.Render( r, out_ )
print len( out_ ) > 0        '' -1 (true) -- the line was rendered

'' JsonRenderer is the other renderer: one JSON object per line

Library: Logging
Category: Logging
Documented under: Members

Clone this wiki locally