OpenVDB 14.0.0
Loading...
Searching...
No Matches
ConsoleSink Class Reference

The sink installed by default, writing to std::cerr. More...

#include <openvdb/util/logging.h>

Public Types

using Ptr = std::shared_ptr<Sink>

Public Member Functions

 ConsoleSink (bool useColor=stderrIsTerminal())
bool useColor () const
void setUseColor (bool)
void append (Level, const std::string &message, const char *file, int line) override
const std::string & name () const
Level threshold () const
void setThreshold (Level)

Static Public Member Functions

static const char * defaultName ()
 The name under which this sink is registered.
static bool stderrIsTerminal ()
 Return true if stderr is connected to a terminal.

Detailed Description

The sink installed by default, writing to std::cerr.

Member Typedef Documentation

◆ Ptr

using Ptr = std::shared_ptr<Sink>
inherited

Constructor & Destructor Documentation

◆ ConsoleSink()

ConsoleSink ( bool useColor = stderrIsTerminal())
explicit

Member Function Documentation

◆ append()

void append ( Level level,
const std::string & message,
const char * file,
int line )
overridevirtual
Parameters
levelSeverity of the message.
messageThe formatted message text, without a trailing newline.
fileSource file the message was logged from, may be null.
lineLine in file, or 0 if unknown.

Implements Sink.

◆ defaultName()

const char * defaultName ( )
static

The name under which this sink is registered.

◆ name()

const std::string & name ( ) const
inherited

◆ setThreshold()

void setThreshold ( Level )
inherited

◆ setUseColor()

void setUseColor ( bool )

◆ stderrIsTerminal()

bool stderrIsTerminal ( )
static

Return true if stderr is connected to a terminal.

◆ threshold()

Level threshold ( ) const
inherited

◆ useColor()

bool useColor ( ) const