Music Hub  ..
A session-wide music playback service
core::ubuntu::media::Logger Class Referenceabstract

#include <logger.h>

+ Inheritance diagram for core::ubuntu::media::Logger:
+ Collaboration diagram for core::ubuntu::media::Logger:

Classes

struct  Location
 

Public Types

enum  Severity {
  Severity::kTrace,
  Severity::kDebug,
  Severity::kInfo,
  Severity::kWarning,
  Severity::kError,
  Severity::kFatal
}
 

Public Member Functions

virtual void Init (const core::ubuntu::media::Logger::Severity &severity=core::ubuntu::media::Logger::Severity::kWarning)=0
 
virtual void Log (Severity severity, const std::string &message, const boost::optional< Location > &location)=0
 
virtual void Trace (const std::string &message, const boost::optional< Location > &location=boost::optional< Location >{})
 
virtual void Debug (const std::string &message, const boost::optional< Location > &location=boost::optional< Location >{})
 
virtual void Info (const std::string &message, const boost::optional< Location > &location=boost::optional< Location >{})
 
virtual void Warning (const std::string &message, const boost::optional< Location > &location=boost::optional< Location >{})
 
virtual void Error (const std::string &message, const boost::optional< Location > &location=boost::optional< Location >{})
 
virtual void Fatal (const std::string &message, const boost::optional< Location > &location=boost::optional< Location >{})
 
template<typename... T>
void Tracef (const boost::optional< Location > &location, const std::string &pattern, T &&...args)
 
template<typename... T>
void Debugf (const boost::optional< Location > &location, const std::string &pattern, T &&...args)
 
template<typename... T>
void Infof (const boost::optional< Location > &location, const std::string &pattern, T &&...args)
 
template<typename... T>
void Warningf (const boost::optional< Location > &location, const std::string &pattern, T &&...args)
 
template<typename... T>
void Errorf (const boost::optional< Location > &location, const std::string &pattern, T &&...args)
 
template<typename... T>
void Fatalf (const boost::optional< Location > &location, const std::string &pattern, T &&...args)
 
- Public Member Functions inherited from core::ubuntu::media::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
virtual ~NonCopyable ()=default
 
NonCopyableoperator= (const NonCopyable &)=delete
 

Protected Member Functions

 Logger ()=default
 

Detailed Description

Definition at line 33 of file logger.h.

Member Enumeration Documentation

Enumerator
kTrace 
kDebug 
kInfo 
kWarning 
kError 
kFatal 

Definition at line 37 of file logger.h.

Constructor & Destructor Documentation

core::ubuntu::media::Logger::Logger ( )
protecteddefault

Referenced by Fatalf().

Member Function Documentation

void core::ubuntu::media::Logger::Debug ( const std::string &  message,
const boost::optional< Location > &  location = boost::optional<Location>{} 
)
virtual

Definition at line 111 of file logger.cpp.

References core::ubuntu::media::Log().

Referenced by Debugf().

+ Here is the call graph for this function:

template<typename... T>
void core::ubuntu::media::Logger::Debugf ( const boost::optional< Location > &  location,
const std::string &  pattern,
T &&...  args 
)
inline

Definition at line 71 of file logger.h.

References Debug(), and core::ubuntu::media::Utils::Sprintf().

+ Here is the call graph for this function:

void core::ubuntu::media::Logger::Error ( const std::string &  message,
const boost::optional< Location > &  location = boost::optional<Location>{} 
)
virtual

Definition at line 123 of file logger.cpp.

References core::ubuntu::media::Log().

Referenced by Errorf().

+ Here is the call graph for this function:

template<typename... T>
void core::ubuntu::media::Logger::Errorf ( const boost::optional< Location > &  location,
const std::string &  pattern,
T &&...  args 
)
inline

Definition at line 86 of file logger.h.

References Error(), and core::ubuntu::media::Utils::Sprintf().

+ Here is the call graph for this function:

void core::ubuntu::media::Logger::Fatal ( const std::string &  message,
const boost::optional< Location > &  location = boost::optional<Location>{} 
)
virtual

Definition at line 127 of file logger.cpp.

References core::ubuntu::media::Log().

Referenced by Fatalf().

+ Here is the call graph for this function:

template<typename... T>
void core::ubuntu::media::Logger::Fatalf ( const boost::optional< Location > &  location,
const std::string &  pattern,
T &&...  args 
)
inline

Definition at line 91 of file logger.h.

References Fatal(), Log(), Logger(), core::ubuntu::media::operator<<(), core::ubuntu::media::SetLogger(), and core::ubuntu::media::Utils::Sprintf().

+ Here is the call graph for this function:

void core::ubuntu::media::Logger::Info ( const std::string &  message,
const boost::optional< Location > &  location = boost::optional<Location>{} 
)
virtual

Definition at line 115 of file logger.cpp.

References core::ubuntu::media::Log().

Referenced by Infof().

+ Here is the call graph for this function:

template<typename... T>
void core::ubuntu::media::Logger::Infof ( const boost::optional< Location > &  location,
const std::string &  pattern,
T &&...  args 
)
inline

Definition at line 76 of file logger.h.

References Info(), and core::ubuntu::media::Utils::Sprintf().

+ Here is the call graph for this function:

virtual void core::ubuntu::media::Logger::Init ( const core::ubuntu::media::Logger::Severity severity = core::ubuntu::media::Logger::Severity::kWarning)
pure virtual
virtual void core::ubuntu::media::Logger::Log ( Severity  severity,
const std::string &  message,
const boost::optional< Location > &  location 
)
pure virtual

Referenced by Fatalf().

void core::ubuntu::media::Logger::Trace ( const std::string &  message,
const boost::optional< Location > &  location = boost::optional<Location>{} 
)
virtual

Definition at line 107 of file logger.cpp.

References core::ubuntu::media::Log().

Referenced by Tracef().

+ Here is the call graph for this function:

template<typename... T>
void core::ubuntu::media::Logger::Tracef ( const boost::optional< Location > &  location,
const std::string &  pattern,
T &&...  args 
)
inline

Definition at line 66 of file logger.h.

References core::ubuntu::media::Utils::Sprintf(), and Trace().

+ Here is the call graph for this function:

void core::ubuntu::media::Logger::Warning ( const std::string &  message,
const boost::optional< Location > &  location = boost::optional<Location>{} 
)
virtual

Definition at line 119 of file logger.cpp.

References core::ubuntu::media::Log().

Referenced by Warningf().

+ Here is the call graph for this function:

template<typename... T>
void core::ubuntu::media::Logger::Warningf ( const boost::optional< Location > &  location,
const std::string &  pattern,
T &&...  args 
)
inline

Definition at line 81 of file logger.h.

References core::ubuntu::media::Utils::Sprintf(), and Warning().

+ Here is the call graph for this function:


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