-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogger.h
More file actions
executable file
·95 lines (81 loc) · 3.9 KB
/
Logger.h
File metadata and controls
executable file
·95 lines (81 loc) · 3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
*********************************************************************************
* In the name of Almighty *
* *
* Logger.h : Robocup 3D Soccer Simulation Team Zigorat *
* (This team was previously named Gcyrus) *
* *
* Date: 03/20/2007 *
* Author: Mahdi Hamdarsi *
* Comments: Class decleration for Logger, which is used to log information *
* *
*********************************************************************************
*/
/*! \file Logger.h
<pre>
<b>File:</b> Logger.h
<b>Project:</b> Robocup Soccer Simulation Team: Zigorat
<b>Authors:</b> Mahdi Hamdarsi
<b>Created:</b> 03/20/2007
<b>Last Revision:</b> $ID$
<b>Contents:</b> Class decleration for Logger, which is used to log information
<hr size=2>
<h2><b>Changes</b></h2>
<b>Date</b> <b>Author</b> <b>Comment</b>
03/20/2007 Mahdi Initial version created
</pre>
*/
#ifndef LOGGER
#define LOGGER
#include <iostream>
#include <string>
/*#include "geometry.h"*/
using namespace std;
#define END "\n"
#define endl "\n" /*!< This is to use endl with loggers */
// .
// /|\ <-- That is because of iostream handling.
// |
/*****************************************************************************/
/************************** CLASS LOGGER *************************************/
/*****************************************************************************/
/*! The Logger Class is used in the RoboCup Soccer environment
to log the agents debugging information to the specified
output, so that a backtrace of agents actions could be
generated and tested. */
class Logger
{
ostream *m_OS; /*!< Output stream to log to */
bool m_Created; /*!< Checks if the file is created */
bool m_Enabled; /*!< Sets wheather logger is enabled */
public:
Logger(bool bEnabled);
void Init( string teamName, int playerNo );
void Init( string teamName, int PlayerNum, string name );
Logger ( ostream &os = cout,
bool bEnabled = true );
Logger ( const char *strFileName,
bool bEnabled = true );
~Logger ( );
Logger & operator << ( const char * strLog );
Logger & operator << ( const char chrLog );
Logger & operator << ( const string strLog );
Logger & operator << ( const int intLog );
Logger & operator << ( const long int intLog );
Logger & operator << ( const unsigned int intLog );
Logger & operator << ( const double dblLog );
//Logger & operator << ( const Vector3f vector3fLog );
bool setEnabled ( bool bEnabled );
bool getEnabled ( void );
};
//extern Logger logger; /*!< Logger to log normal information */
//extern Logger BasicLogger; /*!< Logger to log BasicAgent information */
//extern Logger WMLogger; /*!< Logger to log WorldModel information */
//extern Logger CommLogger; /*!< Logger to log Connection messages */
extern Logger gVisionInfoLog;
extern Logger gSpeedLog;
extern Logger gLog; /*!< Logger to log Connection messages */
extern Logger gDribbleLog;
extern Logger gHearSayLog;
extern Logger gProcessingLog;
#endif