< prev index next >
src/share/vm/logging/logTagSet.hpp
Print this page
rev 8933 : 8046148.01
*** 21,40 ****
* questions.
*
*/
#ifndef SHARE_VM_LOGGING_LOGTAGSET_HPP
#define SHARE_VM_LOGGING_LOGTAGSET_HPP
#include "logging/logDecorators.hpp"
#include "logging/logLevel.hpp"
#include "logging/logOutputList.hpp"
#include "logging/logTag.hpp"
#include "utilities/globalDefinitions.hpp"
// The tagset represents a combination of tags that occur in a log call somewhere.
// Tagsets are created automatically by the LogTagSetMappings and should never be
// instantiated directly somewhere else.
! class LogTagSet {
private:
static LogTagSet* _list;
static size_t _ntagsets;
LogTagSet* const _next;
--- 21,41 ----
* questions.
*
*/
#ifndef SHARE_VM_LOGGING_LOGTAGSET_HPP
#define SHARE_VM_LOGGING_LOGTAGSET_HPP
+
#include "logging/logDecorators.hpp"
#include "logging/logLevel.hpp"
#include "logging/logOutputList.hpp"
#include "logging/logTag.hpp"
#include "utilities/globalDefinitions.hpp"
// The tagset represents a combination of tags that occur in a log call somewhere.
// Tagsets are created automatically by the LogTagSetMappings and should never be
// instantiated directly somewhere else.
! class LogTagSet VALUE_OBJ_CLASS_SPEC {
private:
static LogTagSet* _list;
static size_t _ntagsets;
LogTagSet* const _next;
*** 85,104 ****
bool has_output(const LogOutput* output);
bool is_level(LogLevelType level);
void log(LogLevelType level, const char* msg);
};
! template <LogTagType T0, LogTagType T1 = LogTag::__NO_TAG, LogTagType T2 = LogTag::__NO_TAG, LogTagType T3 = LogTag::__NO_TAG, LogTagType T4 = LogTag::__NO_TAG>
! class LogTagSetMapping {
private:
static LogTagSet _tagset;
public:
static LogTagSet& tagset() {
return _tagset;
}
};
template <LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4>
LogTagSet LogTagSetMapping<T0, T1, T2, T3, T4>::_tagset(T0, T1, T2, T3, T4);
! #endif
--- 86,108 ----
bool has_output(const LogOutput* output);
bool is_level(LogLevelType level);
void log(LogLevelType level, const char* msg);
};
! template <LogTagType T0, LogTagType T1 = LogTag::__NO_TAG, LogTagType T2 = LogTag::__NO_TAG,
! LogTagType T3 = LogTag::__NO_TAG, LogTagType T4 = LogTag::__NO_TAG>
! class LogTagSetMapping : public AllStatic {
private:
static LogTagSet _tagset;
public:
static LogTagSet& tagset() {
return _tagset;
}
};
+ // Instantiate the static field _tagset for all tagsets that are used for logging somewhere.
+ // (This must be done here rather than the .cpp file because it's a template.)
template <LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4>
LogTagSet LogTagSetMapping<T0, T1, T2, T3, T4>::_tagset(T0, T1, T2, T3, T4);
! #endif // SHARE_VM_LOGGING_LOGTAGSET_HPP
< prev index next >