logLevel.hpp (9540:e9b6c63ca4a6) logLevel.hpp (9604:150c50761d56)
1/*
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *

--- 44 unchanged lines hidden (view full) ---

53 public:
54 enum type {
55 Off,
56#define LOG_LEVEL(name, printname) name,
57 LOG_LEVEL_LIST
58#undef LOG_LEVEL
59 Count,
60 Invalid,
1/*
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *

--- 44 unchanged lines hidden (view full) ---

53 public:
54 enum type {
55 Off,
56#define LOG_LEVEL(name, printname) name,
57 LOG_LEVEL_LIST
58#undef LOG_LEVEL
59 Count,
60 Invalid,
61 NotMentioned,
61 First = Off + 1,
62 Last = Error,
63 Default = Warning,
64 Unspecified = Info
65 };
66
67 static const char *name(LogLevel::type level) {
62 First = Off + 1,
63 Last = Error,
64 Default = Warning,
65 Unspecified = Info
66 };
67
68 static const char *name(LogLevel::type level) {
69 assert(level >= 0 && level < LogLevel::Count, "Invalid level (enum value %d).", level);
68 return _name[level];
69 }
70
71 static LogLevel::type from_string(const char* str);
72
73 private:
74 static const char* _name[];
75};
76
77typedef LogLevel::type LogLevelType;
78
79#endif // SHARE_VM_LOGGING_LOGLEVEL_HPP
70 return _name[level];
71 }
72
73 static LogLevel::type from_string(const char* str);
74
75 private:
76 static const char* _name[];
77};
78
79typedef LogLevel::type LogLevelType;
80
81#endif // SHARE_VM_LOGGING_LOGLEVEL_HPP