pdal::Log

class pdal::Log

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

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

LogLevel getLevel()

Return
the logging level of the pdal::Log instance

void setLevel(LogLevel v)

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

Parameters
  • v: logging level to use for get() comparison operations

void setLeader(const std::string &leader)

Set the leader string (deprecated).

Parameters
  • leader: Leader string.

void pushLeader(const std::string &leader)

Push the leader string onto the stack.

Parameters
  • leader: Leader string

std::string leader() const

Get the leader string.

Return
The current leader string.

void popLeader()

Pop the current leader string.

std::string getLevelString(LogLevel v) const

Return
A string representing the LogLevel

Log stream operations

std::ostream *getLogStream()

Return
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.

Public Functions

Log(std::string const &leaderString, std::string const &outputName, bool timing = false)

Constructs a pdal::Log instance.

Parameters
  • leaderString: A string to presage all log entries with
  • outputName: A filename or one of ‘stdout’, ‘stdlog’, or ‘stderr’ to use for outputting log information.
  • timing: Set to true to get timing output with log messages.

Log(std::string const &leaderString, std::ostream *v, bool timing = false)

Constructs a pdal::Log instance.

Parameters
  • leaderString: A string to presage all log entries with
  • v: An existing std::ostream to use for logging (instead of the the instance creating its own)
  • timing: Set to true to get timing output with log messages.