AWS SDK for C++  1.9.132
AWS SDK for C++
Macros
LogMacros.h File Reference
#include <aws/core/Core_EXPORTS.h>
#include <aws/core/utils/logging/LogLevel.h>
#include <aws/core/utils/logging/AWSLogging.h>
#include <aws/core/utils/logging/LogSystemInterface.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>

Go to the source code of this file.

Macros

#define AWS_LOG_FLUSH()
 
#define AWS_LOG(level, tag, ...)
 
#define AWS_LOG_FATAL(tag, ...)
 
#define AWS_LOG_ERROR(tag, ...)
 
#define AWS_LOG_WARN(tag, ...)
 
#define AWS_LOG_INFO(tag, ...)
 
#define AWS_LOG_DEBUG(tag, ...)
 
#define AWS_LOG_TRACE(tag, ...)
 
#define AWS_LOGSTREAM(level, tag, streamExpression)
 
#define AWS_LOGSTREAM_FATAL(tag, streamExpression)
 
#define AWS_LOGSTREAM_ERROR(tag, streamExpression)
 
#define AWS_LOGSTREAM_WARN(tag, streamExpression)
 
#define AWS_LOGSTREAM_INFO(tag, streamExpression)
 
#define AWS_LOGSTREAM_DEBUG(tag, streamExpression)
 
#define AWS_LOGSTREAM_TRACE(tag, streamExpression)
 
#define AWS_LOGSTREAM_FLUSH()   AWS_LOG_FLUSH()
 

Macro Definition Documentation

◆ AWS_LOG

#define AWS_LOG (   level,
  tag,
  ... 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= level ) \
{ \
logSystem->Log(level, tag, __VA_ARGS__); \
} \
}

Definition at line 52 of file LogMacros.h.

◆ AWS_LOG_DEBUG

#define AWS_LOG_DEBUG (   tag,
  ... 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Debug ) \
{ \
logSystem->Log(Aws::Utils::Logging::LogLevel::Debug, tag, __VA_ARGS__); \
} \
}

Definition at line 97 of file LogMacros.h.

◆ AWS_LOG_ERROR

#define AWS_LOG_ERROR (   tag,
  ... 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Error ) \
{ \
logSystem->Log(Aws::Utils::Logging::LogLevel::Error, tag, __VA_ARGS__); \
} \
}

Definition at line 70 of file LogMacros.h.

◆ AWS_LOG_FATAL

#define AWS_LOG_FATAL (   tag,
  ... 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Fatal ) \
{ \
logSystem->Log(Aws::Utils::Logging::LogLevel::Fatal, tag, __VA_ARGS__); \
} \
}

Definition at line 61 of file LogMacros.h.

◆ AWS_LOG_FLUSH

#define AWS_LOG_FLUSH ( )
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem ) \
{ \
logSystem->Flush(); \
} \
}

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0.

Definition at line 43 of file LogMacros.h.

◆ AWS_LOG_INFO

#define AWS_LOG_INFO (   tag,
  ... 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Info ) \
{ \
logSystem->Log(Aws::Utils::Logging::LogLevel::Info, tag, __VA_ARGS__); \
} \
}

Definition at line 88 of file LogMacros.h.

◆ AWS_LOG_TRACE

#define AWS_LOG_TRACE (   tag,
  ... 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Trace ) \
{ \
logSystem->Log(Aws::Utils::Logging::LogLevel::Trace, tag, __VA_ARGS__); \
} \
}

Definition at line 106 of file LogMacros.h.

◆ AWS_LOG_WARN

#define AWS_LOG_WARN (   tag,
  ... 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Warn ) \
{ \
logSystem->Log(Aws::Utils::Logging::LogLevel::Warn, tag, __VA_ARGS__); \
} \
}

Definition at line 79 of file LogMacros.h.

◆ AWS_LOGSTREAM

#define AWS_LOGSTREAM (   level,
  tag,
  streamExpression 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= level ) \
{ \
Aws::OStringStream logStream; \
logStream << streamExpression; \
logSystem->LogStream( logLevel, tag, logStream ); \
} \
}

Definition at line 115 of file LogMacros.h.

◆ AWS_LOGSTREAM_DEBUG

#define AWS_LOGSTREAM_DEBUG (   tag,
  streamExpression 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Debug ) \
{ \
Aws::OStringStream logStream; \
logStream << streamExpression; \
logSystem->LogStream( Aws::Utils::Logging::LogLevel::Debug, tag, logStream ); \
} \
}

Definition at line 170 of file LogMacros.h.

◆ AWS_LOGSTREAM_ERROR

#define AWS_LOGSTREAM_ERROR (   tag,
  streamExpression 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Error ) \
{ \
Aws::OStringStream logStream; \
logStream << streamExpression; \
logSystem->LogStream( Aws::Utils::Logging::LogLevel::Error, tag, logStream ); \
} \
}

Definition at line 137 of file LogMacros.h.

◆ AWS_LOGSTREAM_FATAL

#define AWS_LOGSTREAM_FATAL (   tag,
  streamExpression 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Fatal ) \
{ \
Aws::OStringStream logStream; \
logStream << streamExpression; \
logSystem->LogStream( Aws::Utils::Logging::LogLevel::Fatal, tag, logStream ); \
} \
}

Definition at line 126 of file LogMacros.h.

◆ AWS_LOGSTREAM_FLUSH

#define AWS_LOGSTREAM_FLUSH ( )    AWS_LOG_FLUSH()

Definition at line 192 of file LogMacros.h.

◆ AWS_LOGSTREAM_INFO

#define AWS_LOGSTREAM_INFO (   tag,
  streamExpression 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Info ) \
{ \
Aws::OStringStream logStream; \
logStream << streamExpression; \
logSystem->LogStream( Aws::Utils::Logging::LogLevel::Info, tag, logStream ); \
} \
}

Definition at line 159 of file LogMacros.h.

◆ AWS_LOGSTREAM_TRACE

#define AWS_LOGSTREAM_TRACE (   tag,
  streamExpression 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Trace ) \
{ \
Aws::OStringStream logStream; \
logStream << streamExpression; \
logSystem->LogStream( Aws::Utils::Logging::LogLevel::Trace, tag, logStream ); \
} \
}

Definition at line 181 of file LogMacros.h.

◆ AWS_LOGSTREAM_WARN

#define AWS_LOGSTREAM_WARN (   tag,
  streamExpression 
)
Value:
{ \
Aws::Utils::Logging::LogSystemInterface* logSystem = Aws::Utils::Logging::GetLogSystem(); \
if ( logSystem && logSystem->GetLogLevel() >= Aws::Utils::Logging::LogLevel::Warn ) \
{ \
Aws::OStringStream logStream; \
logStream << streamExpression; \
logSystem->LogStream( Aws::Utils::Logging::LogLevel::Warn, tag, logStream ); \
} \
}

Definition at line 148 of file LogMacros.h.

Aws::OStringStream
std::basic_ostringstream< char, std::char_traits< char >, Aws::Allocator< char > > OStringStream
Definition: AWSStringStream.h:37
Aws::Utils::Logging::LogLevel::Trace
@ Trace
Aws::Utils::Logging::GetLogSystem
AWS_CORE_API LogSystemInterface * GetLogSystem()
Aws::Utils::Logging::LogLevel::Error
@ Error