Skip to content

PlayerLink::Core::Logger

A Singelton Logger class which will be used by PlayerLink to create logs based on a severity level and append to a logfile. More...

#include <Logger.h>

Public Functions

Name
Logger(Logger & otherLogger)
void operator=(const Logger & )
void log(LogSeverity severity, std::string message, const boost::source_location & location =BOOST_CURRENT_LOCATION)
Logger * getLogger()

Detailed Description

class PlayerLink::Core::Logger;

A Singelton Logger class which will be used by PlayerLink to create logs based on a severity level and append to a logfile.

Author:

  • Hanzalah Ravat
  • Ashwin Jaimal

Public Functions Documentation

function Logger

Logger(
    Logger & otherLogger
)

Singleton Class should not be cloneable. Constructor used to prevent multiple instances of Logger

function operator=

void operator=(
    const Logger & 
)

Singleton classes must not be assignable. This method will prevent the class from being assingned

function log

void log(
    LogSeverity severity,
    std::string message,
    const boost::source_location & location =BOOST_CURRENT_LOCATION
)

Parameters:

  • severity The Severity level of the log
  • message The message which will be written into the logfile

Method used to log an event

function getLogger

static Logger * getLogger()

Return: A pointer to the Logger Instance in memory

Gets the running logger instance pointer


Updated on 26 January 2021 at 13:37:16 UTC