< prev index next >

src/share/vm/logging/logDecorations.hpp

Print this page
rev 10178 : imported patch 8145934


  33  public:
  34   static const int DecorationsBufferSize = 256;
  35  private:
  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 
  43   jlong java_millis();
  44   void create_decorations(const LogDecorators& decorators);
  45 
  46 #define DECORATOR(name, abbr) char* create_##name##_decoration(char* pos);
  47   DECORATOR_LIST
  48 #undef DECORATOR
  49 
  50  public:
  51   LogDecorations(LogLevelType level, const LogTagSet& tagset, const LogDecorators& decorators);
  52 








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



  54     return _decoration_offset[decorator];
  55   }
  56 
  57   static void set_vm_start_time_millis(jlong start_time) {
  58     _vm_start_time_millis = start_time;
  59   }
  60 };
  61 
  62 #endif // SHARE_VM_LOGGING_LOGDECORATIONS_HPP


  33  public:
  34   static const int DecorationsBufferSize = 256;
  35  private:
  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 
  43   jlong java_millis();
  44   void create_decorations(const LogDecorators& decorators);
  45 
  46 #define DECORATOR(name, abbr) char* create_##name##_decoration(char* pos);
  47   DECORATOR_LIST
  48 #undef DECORATOR
  49 
  50  public:
  51   LogDecorations(LogLevelType level, const LogTagSet& tagset, const LogDecorators& decorators);
  52 
  53   LogLevelType level() const {
  54     return _level;
  55   }
  56 
  57   void set_level(LogLevelType level) {
  58     _level = level;
  59   }
  60 
  61   const char* decoration(LogDecorators::Decorator decorator) const {
  62     if (decorator == LogDecorators::level_decorator) {
  63       return LogLevel::name(_level);
  64     }
  65     return _decoration_offset[decorator];
  66   }
  67 
  68   static void set_vm_start_time_millis(jlong start_time) {
  69     _vm_start_time_millis = start_time;
  70   }
  71 };
  72 
  73 #endif // SHARE_VM_LOGGING_LOGDECORATIONS_HPP
< prev index next >