Skip to content

Modern Log LogEvent AddValue

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

Home › Logging › Logging › LogEvent.AddValue

LogEvent.AddValue

Adds a named field from a value you built yourself, of any supported kind.

Syntax

AddValue( k, v as LogValue )

Notes

  • any tag, built by hand

Examples

#import "std/logs"
using logs

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

'' The escape hatch: any tag, built by hand. LogValue has a constructor
'' per supported type, so this is what the typed methods call underneath.
dim v as LogValue = LogValue( 42ll )
lg.Info( ).AddValue( "answer", v ).Msg( "computed" )

Library: Logging
Category: Logging
Documented under: Members

Clone this wiki locally