< prev index next >

src/share/vm/logging/logDecorations.hpp

Print this page
rev 10661 : [mq]: 8145934


  36   char _decorations_buffer[DecorationsBufferSize];
  37   char* _decoration_offset[LogDecorators::Count];
  38   LogLevelType _level;
  39   LogTagSet _tagset;
  40   jlong _millis;
  41   static jlong _vm_start_time_millis;
  42   static const char* _host_name;
  43 
  44   jlong java_millis();
  45   void create_decorations(const LogDecorators& decorators);
  46 
  47 #define DECORATOR(name, abbr) char* create_##name##_decoration(char* pos);
  48   DECORATOR_LIST
  49 #undef DECORATOR
  50 
  51  public:
  52   static void initialize(jlong vm_start_time);
  53 
  54   LogDecorations(LogLevelType level, const LogTagSet& tagset, const LogDecorators& decorators);
  55 








  56   const char* decoration(LogDecorators::Decorator decorator) const {



  57     return _decoration_offset[decorator];
  58   }
  59 };
  60 
  61 #endif // SHARE_VM_LOGGING_LOGDECORATIONS_HPP


  36   char _decorations_buffer[DecorationsBufferSize];
  37   char* _decoration_offset[LogDecorators::Count];
  38   LogLevelType _level;
  39   LogTagSet _tagset;
  40   jlong _millis;
  41   static jlong _vm_start_time_millis;
  42   static const char* _host_name;
  43 
  44   jlong java_millis();
  45   void create_decorations(const LogDecorators& decorators);
  46 
  47 #define DECORATOR(name, abbr) char* create_##name##_decoration(char* pos);
  48   DECORATOR_LIST
  49 #undef DECORATOR
  50 
  51  public:
  52   static void initialize(jlong vm_start_time);
  53 
  54   LogDecorations(LogLevelType level, const LogTagSet& tagset, const LogDecorators& decorators);
  55 
  56   LogLevelType level() const {
  57     return _level;
  58   }
  59 
  60   void set_level(LogLevelType level) {
  61     _level = level;
  62   }
  63 
  64   const char* decoration(LogDecorators::Decorator decorator) const {
  65     if (decorator == LogDecorators::level_decorator) {
  66       return LogLevel::name(_level);
  67     }
  68     return _decoration_offset[decorator];
  69   }
  70 };
  71 
  72 #endif // SHARE_VM_LOGGING_LOGDECORATIONS_HPP
< prev index next >