Salome HOME
ea4696aa727c2d2da083afac93d13278a9605a9c
[modules/yacs.git] / src / engine / LogRecord.hxx
1 #ifndef _LOGRECORD_HXX_
2 #define _LOGRECORD_HXX_
3
4 #include <string>
5
6 namespace YACS
7 {
8   namespace ENGINE
9   {
10 /*! \brief Class for logging record
11  *
12  */
13     class LogRecord
14     {
15     public:
16       typedef int LogLevel;
17       static const LogLevel FATAL    = 50;
18       static const LogLevel ERROR    = 40;
19       static const LogLevel WARNING  = 30;
20       static const LogLevel INFO     = 20;
21       static const LogLevel DEBUG    = 10;
22       static const LogLevel NOTSET   = 0;
23
24       LogRecord(const std::string& name,int level,const std::string& message, const char* file, int line);
25       virtual ~LogRecord();
26       /** The logger name. */
27       const std::string _loggerName;
28       /** The message of logging record */
29       const std::string _message;
30       /** Level of logging record */
31       int _level;
32       /** filename of logging record */
33       char* _fileName;
34       /** line number of logging record */
35       int _line;
36       virtual std::string getLevelName(int level);
37
38       virtual std::string getStr();
39
40     protected:
41     };
42   }
43 }
44
45 #endif