hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
logger Namespace Reference

Classes

class  DummyLogger
 
class  Logger
 
struct  LoggerConfig
 
class  LoggerManagerTree
 
class  LoggerSpdlog
 
class  LogPatterns
 Patterns for logging depending on the log level. More...
 

Typedefs

using LoggerPtr = std::shared_ptr< Logger >
 
using LoggerManagerTreePtr = std::shared_ptr< LoggerManagerTree >
 
using ConstLoggerConfigPtr = std::shared_ptr< const LoggerConfig >
 

Enumerations

enum  LogLevel {
  LogLevel::kTrace, LogLevel::kDebug, LogLevel::kInfo, LogLevel::kWarn,
  LogLevel::kError, LogLevel::kCritical
}
 Log levels. More...
 

Functions

LoggerPtr getDummyLoggerPtr ()
 
std::string boolRepr (bool value)
 
template<typename T >
std::string logBool (T val)
 
template<class Collection , class Lambda >
std::string to_string (const Collection &collection, Lambda transform)
 
template<class Optional , class Lambda >
std::string opt_to_string (const Optional &opt, Lambda transform)
 
LogPatterns getDefaultLogPatterns ()
 

Variables

const LogLevel kDefaultLogLevel = LogLevel::kInfo
 

Detailed Description

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Typedef Documentation

using logger::ConstLoggerConfigPtr = typedef std::shared_ptr<const LoggerConfig>
using logger::LoggerManagerTreePtr = typedef std::shared_ptr<LoggerManagerTree>
using logger::LoggerPtr = typedef std::shared_ptr<Logger>

Enumeration Type Documentation

enum logger::LogLevel
strong

Log levels.

Enumerator
kTrace 
kDebug 
kInfo 
kWarn 
kError 
kCritical 

Function Documentation

std::string logger::boolRepr ( bool  value)

Convert bool value to human readable string repr

Parameters
valuevalue for transformation
Returns
"true" or "false"

Here is the caller graph for this function:

LogPatterns logger::getDefaultLogPatterns ( )

Here is the call graph for this function:

Here is the caller graph for this function:

LoggerPtr logger::getDummyLoggerPtr ( )

Here is the call graph for this function:

template<typename T >
std::string logger::logBool ( val)

Converts object to bool and provides string repr of it

Template Parameters
T- type of object, T must implement bool operator
Parameters
val- value for convertation
Returns
string representation of bool object

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Optional , class Lambda >
std::string logger::opt_to_string ( const Optional &  opt,
Lambda  transform 
)

Function provide string representation of optional value

Template Parameters
Optional- type of optional
Lambda- function that consume value type and return std::string
Parameters
opt- value wrapped by optional
transform- function that transforming value to std::string
Returns
string repr of value
template<class Collection , class Lambda >
std::string logger::to_string ( const Collection &  collection,
Lambda  transform 
)

Function provide string representation of collection

Template Parameters
Collection- type should implement for semantic
Lambda- function that transform argument to string
Parameters
collection- bunch of objects
transform- function that convert object to string
Returns
string repr of collection

Here is the caller graph for this function:

Variable Documentation

const LogLevel logger::kDefaultLogLevel = LogLevel::kInfo