79023017e04a28865ac46ab2baf87a0b8f0f0b3d
[platform/core/security/vasum.git] / libs / logger / level.hpp
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Contact: Dariusz Michaluk (d.michaluk@samsung.com)
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License
17  */
18
19 /**
20  * @file
21  * @author  Dariusz Michaluk (d.michaluk@samsung.com)
22  * @brief   LogLevel
23  */
24
25 #ifndef COMMON_LOGGER_LEVEL_HPP
26 #define COMMON_LOGGER_LEVEL_HPP
27
28 #include <string>
29
30 namespace logger {
31
32 enum class LogLevel {
33     TRACE,
34     DEBUG,
35     INFO,
36     WARN,
37     ERROR,
38     HELP
39 };
40
41 /**
42  * @param logLevel LogLevel
43  * @return std::sting representation of the LogLevel value
44  */
45 std::string toString(const LogLevel logLevel);
46
47 /**
48  * @param level string representation of log level
49  * @return parsed LogLevel value
50  */
51 LogLevel parseLogLevel(const std::string& level);
52
53 } // namespace logger
54
55 #endif // COMMON_LOGGER_LEVEL_HPP