From 460d9bda5f03c5da29864fa9dd160848097be51b Mon Sep 17 00:00:00 2001 From: TravisBot <> Date: Sat, 6 Jan 2018 11:36:50 +0000 Subject: [Travis] Rebuilding documentation --- classyage_1_1Logger.html | 157 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 110 insertions(+), 47 deletions(-) (limited to 'classyage_1_1Logger.html') diff --git a/classyage_1_1Logger.html b/classyage_1_1Logger.html index 602db2e4..b1f14b1f 100644 --- a/classyage_1_1Logger.html +++ b/classyage_1_1Logger.html @@ -109,21 +109,30 @@ $(document).ready(function(){initNavTree('classyage_1_1Logger.html','');});
Public Member Functions | Static Public Member Functions | -Private Attributes | List of all members
yage::Logger Class Reference
+

Logger

+ + More...

+

#include <logger.h>

- - + + + + + + + + @@ -132,22 +141,44 @@ Public Member Functions + +

Public Member Functions

 Logger ()
 
LogMessage operator() (const std::string &fileName, int lineNum)
 
 Logger (const std::string &file_path)
 
 Logger (LogLevel min_level)
 
 Logger (LogLevel min_level, const std::string &file_path)
 
LogMessage operator() (LogLevel level=LogLevel::INFO, const std::string &fileName="", int lineNum=-1)
 
void flush (const LogMessage *msg)
 
void add (const LogSink &sink)
 
void clear ()
 
void setLevel (LogLevel min_level)
 
-

Static Public Member Functions

static Loggerinstance ()
 
- - - - -

-Private Attributes

std::vector< LogSinksinks_
 
std::unique_ptr< Activeactive_
 
-

Constructor & Destructor Documentation

+

Detailed Description

+

Logger

+

Aynchronous logging is built into the YAGE library, which can be used to log events in the game and also debug the game by using the debug output that the game engine produces. This can help if for example, a texture is being loaded.

+

Log levels

+

The logger has five different levels that can be assigned to a message. These are, from lowest to highest severity, LogLevel::DEBUG, LogLevel::INFO, LogLevel::WARNING, LogLevel::ERROR and LogLevel::FATAL. Messages that the developer then wants to write to the logs can take any of these severities and the developer can then decide what the minimum severity is that the logger should log. By default, the logger will log anything that is above LogLevel::INFO.

+

Using the Logger in your Game

+

There are a few preprocessor definitions to make the use of the logger as simple as possible. First of all, there is a definition to get the instance of the current global logger, which can then be used to set a different minimum display level. This definition is yLogger, and an example of how to use it to change the default output level can be seen below

+

``` c++ yLogger.setLevel(yage::LogLevel::ERROR); ```

+

The above code changes the global logger so that it will only output things that are an error or fatal and make the engine crash.

+

Other preprocessor definitions are yLogDebug, yLogInfo, yLogWarning, yLogError and yLogFatal. These return an object that is similar to a buffer, but belongs to the main global logger yLogger. These are the definitions that should be used to print somehting to the main logger. For example

+

``` c++ yLogWarning << "This is a warning"; ```

+

will print the message "This is a warning" with the severity of LogLevel::WARNING.

+

Constructor & Destructor Documentation

+
+ + + + + + + +
yage::Logger::Logger ()
+
+ +
+
+ +
@@ -156,7 +187,32 @@ Private Attributes - + + + + +
yage::Logger::Logger ()const std::string & file_path)
+ + +explicit + + +
+ +
+
+ +
+
+ + +
+ + + + + +
yage::Logger::Logger (LogLevel min_level)
@@ -167,6 +223,32 @@ Private Attributes
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
yage::Logger::Logger (LogLevel min_level,
const std::string & file_path 
)
+
+

Member Function Documentation

@@ -240,21 +322,27 @@ Private Attributes
- +
+ + + + + + - + - + @@ -282,43 +370,18 @@ Private Attributes -

Member Data Documentation

- +
-
LogMessage yage::Logger::operator() (LogLevel level = LogLevel::INFO,
const std::string & fileName, fileName = "",
int lineNum lineNum = -1 
- - - - -
- - -
std::unique_ptr<Active> yage::Logger::active_
-
-private
-
- -
-
- -
-
- - - - - -
- - - + + + + +
std::vector<LogSink> yage::Logger::sinks_void yage::Logger::setLevel (LogLevel min_level)
-
-private
@@ -333,7 +396,7 @@ Private Attributes