libcamera  v0.3.0+92-226ce294
Supporting cameras in Linux since 2019
Public Member Functions | List of all members
libcamera::LogOutput Class Reference

Log output. More...

Public Member Functions

 LogOutput (const char *path, bool color)
 Construct a log output based on a file. More...
 
 LogOutput (std::ostream *stream, bool color)
 Construct a log output based on a stream. More...
 
 LogOutput ()
 Construct a log output to syslog.
 
bool isValid () const
 Check if the log output is valid. More...
 
void write (const LogMessage &msg)
 Write message to log output. More...
 
void write (const std::string &msg)
 Write string to log output. More...
 

Detailed Description

Log output.

The LogOutput class models a log output destination

Constructor & Destructor Documentation

◆ LogOutput() [1/2]

libcamera::LogOutput::LogOutput ( const char *  path,
bool  color 
)

Construct a log output based on a file.

Parameters
[in]pathFull path to log file
[in]colorTrue to output colored messages

◆ LogOutput() [2/2]

libcamera::LogOutput::LogOutput ( std::ostream *  stream,
bool  color 
)

Construct a log output based on a stream.

Parameters
[in]streamStream to send log output to
[in]colorTrue to output colored messages

Member Function Documentation

◆ isValid()

bool libcamera::LogOutput::isValid ( ) const

Check if the log output is valid.

Returns
True if the log output is valid

◆ write() [1/2]

void libcamera::LogOutput::write ( const LogMessage msg)

Write message to log output.

Parameters
[in]msgMessage to write

◆ write() [2/2]

void libcamera::LogOutput::write ( const std::string &  str)

Write string to log output.

Parameters
[in]strString to write

The documentation for this class was generated from the following file: