Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::log::LogStream Class Referencefinal

A stream pipeline to combine log entities. More...

#include <log_stream.h>

Public Member Functions

void Flush () noexcept
 Clear the stream.
 
template<typename T >
LogStreamoperator<< (const Argument< T > &arg)
 Arugment insertion operator. More...
 
LogStreamoperator<< (const LogStream &value)
 LogStream insertion operator. More...
 
LogStreamoperator<< (bool value)
 Boolean insertion operator. More...
 
LogStreamoperator<< (uint8_t value)
 Byte insertion operator. More...
 
LogStreamoperator<< (uint32_t value)
 Unsigned integer insertion operator. More...
 
LogStreamoperator<< (float value)
 Float insertion operator. More...
 
LogStreamoperator<< (const std::string &value)
 String insertion operator. More...
 
LogStreamoperator<< (const char *value)
 C-syle string insertion operator. More...
 
LogStreamoperator<< (LogLevel value)
 LogLeve insertion operator. More...
 
LogStreamoperator<< (const ara::core::ErrorCode &value)
 ErrorCode insertion operator. More...
 
LogStreamoperator<< (const ara::core::InstanceSpecifier &value) noexcept
 InstanceSpecifier insertion operator. More...
 
LogStreamoperator<< (std::vector< std::uint8_t > value)
 Data array insertion operator. More...
 
LogStreamWithLocation (std::string file, int line)
 Log stream at a certian file and a certian line within the file. More...
 
std::string ToString () const noexcept
 Convert the current log stream to a standard string. More...
 

Detailed Description

A stream pipeline to combine log entities.

Member Function Documentation

◆ operator<<() [1/12]

LogStream & ara::log::LogStream::operator<< ( bool  value)

Boolean insertion operator.

Parameters
valueA boolean value
Returns
Reference to the current log stream

◆ operator<<() [2/12]

LogStream & ara::log::LogStream::operator<< ( const ara::core::ErrorCode value)

ErrorCode insertion operator.

Parameters
valueAn error code object
Returns
Reference to the current log stream

◆ operator<<() [3/12]

LogStream & ara::log::LogStream::operator<< ( const ara::core::InstanceSpecifier value)
noexcept

InstanceSpecifier insertion operator.

Parameters
valueAn instance specifier object
Returns
Reference to the current log stream

◆ operator<<() [4/12]

template<typename T >
LogStream & ara::log::LogStream::operator<< ( const Argument< T > &  arg)
inline

Arugment insertion operator.

Template Parameters
TArgument playload type
Parameters
argAn agrgument
Returns
Reference to the current log stream

◆ operator<<() [5/12]

LogStream & ara::log::LogStream::operator<< ( const char *  value)

C-syle string insertion operator.

Parameters
valueCharacter array
Returns
Reference to the current log stream

◆ operator<<() [6/12]

LogStream & ara::log::LogStream::operator<< ( const LogStream value)

LogStream insertion operator.

Parameters
valueAnother logstream
Returns
Reference to the current log stream

◆ operator<<() [7/12]

LogStream & ara::log::LogStream::operator<< ( const std::string &  value)

String insertion operator.

Parameters
valueA string
Returns
Reference to the current log stream

◆ operator<<() [8/12]

LogStream & ara::log::LogStream::operator<< ( float  value)

Float insertion operator.

Parameters
valueA float value
Returns
Reference to the current log stream

◆ operator<<() [9/12]

LogStream & ara::log::LogStream::operator<< ( LogLevel  value)

LogLeve insertion operator.

Parameters
valueLog severity level
Returns
Reference to the current log stream

◆ operator<<() [10/12]

LogStream & ara::log::LogStream::operator<< ( std::vector< std::uint8_t >  value)

Data array insertion operator.

Parameters
valueData byte vector
Returns
Reference to the current log stream

◆ operator<<() [11/12]

LogStream & ara::log::LogStream::operator<< ( uint32_t  value)

Unsigned integer insertion operator.

Parameters
valueAn unsigned integer value
Returns
Reference to the current log stream

◆ operator<<() [12/12]

LogStream & ara::log::LogStream::operator<< ( uint8_t  value)

Byte insertion operator.

Parameters
valueA byte value
Returns
Reference to the current log stream

◆ ToString()

std::string ara::log::LogStream::ToString ( ) const
noexcept

Convert the current log stream to a standard string.

Returns
Serialized log stream string

◆ WithLocation()

LogStream & ara::log::LogStream::WithLocation ( std::string  file,
int  line 
)

Log stream at a certian file and a certian line within the file.

Parameters
fileFile name
lineLine number
Returns
Reference to the current log stream