23 #ifndef _GAZEBO_CONSOLE_HH_
24 #define _GAZEBO_CONSOLE_HH_
41 #define gzmsg (gazebo::common::Console::Instance()->ColorMsg("Msg", 32))
44 #define gzdbg (gazebo::common::Console::Instance()->ColorMsg("Dbg", 36))
47 #define gzwarn (gazebo::common::Console::Instance()->ColorErr("Warning", \
48 __FILE__, __LINE__, 33))
51 #define gzerr (gazebo::common::Console::Instance()->ColorErr("Error", \
52 __FILE__, __LINE__, 31))
55 #define gzlog (gazebo::common::Console::Instance()->Log())
58 #define gzclr_start(clr) "\033[1;33m"
61 #define gzclr_end "\033[0m"
78 public:
void Init(
const std::string &_logFilename);
96 public: std::ostream &
ColorMsg(
const std::string &_lbl,
int _color);
101 public: std::ofstream &
Log();
109 public: std::ostream &
ColorErr(
const std::string &_lbl,
110 const std::string &_file,
unsigned int _line,
int _color);
115 private:
class NullStream :
public std::ostream
122 private: NullStream nullStream;
125 private: std::ostream *msgStream;
128 private: std::ostream *errStream;
131 private: std::ofstream *logStream;