hotspot/src/share/vm/logging/logHandle.hpp
changeset 37461 b5c955296b75
parent 37255 100d4a515df0
child 46701 f559541c0daa
equal deleted inserted replaced
37460:bda48699fd11 37461:b5c955296b75
    65 // Wraps a LogTarget instance and throws away the template information.
    65 // Wraps a LogTarget instance and throws away the template information.
    66 //
    66 //
    67 // This can be used to pass a Log instance as a parameter without
    67 // This can be used to pass a Log instance as a parameter without
    68 // polluting the surrounding API with template functions.
    68 // polluting the surrounding API with template functions.
    69 class LogTargetHandle {
    69 class LogTargetHandle {
    70   friend class LogStream;
       
    71 
       
    72 private:
    70 private:
    73   const LogLevelType _level;
    71   const LogLevelType _level;
    74   LogTagSet*         _tagset;
    72   LogTagSet*         _tagset;
    75 
    73 
    76 public:
    74 public:
       
    75   LogTargetHandle(LogLevelType level, LogTagSet* tagset) : _level(level), _tagset(tagset) {}
       
    76 
    77   template <LogLevelType level, LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4, LogTagType GuardTag>
    77   template <LogLevelType level, LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4, LogTagType GuardTag>
    78   LogTargetHandle(const LogTargetImpl<level, T0, T1, T2, T3, T4, GuardTag>& type_carrier) :
    78   LogTargetHandle(const LogTargetImpl<level, T0, T1, T2, T3, T4, GuardTag>& type_carrier) :
    79       _level(level),
    79       _level(level),
    80       _tagset(&LogTagSetMapping<T0, T1, T2, T3, T4>::tagset()) {}
    80       _tagset(&LogTagSetMapping<T0, T1, T2, T3, T4>::tagset()) {}
    81 
    81