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);
88 public: std::ostream &
ColorMsg(
const std::string &_lbl,
int _color);
93 public: std::ofstream &
Log();
101 public: std::ostream &
ColorErr(
const std::string &_lbl,
102 const std::string &_file,
unsigned int _line,
int _color);
107 private:
class NullStream :
public std::ostream
114 private: NullStream nullStream;
117 private: std::ostream *msgStream;
120 private: std::ostream *errStream;
123 private: std::ofstream *logStream;