pdal::Log

class pdal::Log

pdal::Log is a logging object that is provided by pdal::Stage to facilitate logging operations.

Log stream operations

inline std::ostream *getLogStream()
Returns:

the stream object that is currently being used to for log operations regardless of logging level of the instance.

std::ostream &get(LogLevel level = LogLevel::Info)

Returns the log stream given the logging level.

Parameters:

level – logging level to request If the logging level asked for with pdal::Log::get is less than the logging level of the pdal::Log instance

void floatPrecision(int level)

Sets the floating point precision.

void clearFloat()

Clears the floating point precision settings of the streams.

Destructor

~Log()

The destructor will clean up its own internal log stream, but it will not touch one that is given via the constructor.

Logging level

inline LogLevel getLevel()
Returns:

the logging level of the pdal::Log instance

inline void setLevel(LogLevel v)

Sets the logging level of the pdal::Log instance.

Parameters:

v – logging level to use for get() comparison operations

inline void setLeader(const std::string &leader)

Set the leader string (deprecated).

Parameters:

leader[in] Leader string.

inline void pushLeader(const std::string &leader)

Push the leader string onto the stack.

Parameters:

leader – Leader string

inline std::string leader() const

Get the leader string.

Returns:

The current leader string.

inline void popLeader()

Pop the current leader string.

std::string getLevelString(LogLevel v) const
Returns:

A string representing the LogLevel

Public Static Functions

static LogPtr makeLog(std::string const &leaderString, std::string const &outputName, bool timing = false)
static LogPtr makeLog(std::string const &leaderString, std::ostream *v, bool timing = false)