Skip to content

Modern Log SinkCount

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

Home › Logging › Logging › SinkCount

SinkCount

Returns how many sinks are attached to the logger.

Syntax

SinkCount( ) as int32

Examples

#import "std/logs"
using logs

dim con as ConsoleSink
dim lg as Logger

print lg.SinkCount( )        '' 0 -- a fresh Logger has no sinks

lg.AddSink( @con )
print lg.SinkCount( )        '' 1

'' Logging with no sinks attached is still valid: the record is built
'' and then goes nowhere

Library: Logging
Category: Logging
Documented under: Members

Clone this wiki locally