1 | /* |
2 | * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"). |
5 | * You may not use this file except in compliance with the License. |
6 | * A copy of the License is located at |
7 | * |
8 | * http://aws.amazon.com/apache2.0 |
9 | * |
10 | * or in the "license" file accompanying this file. This file is distributed |
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
12 | * express or implied. See the License for the specific language governing |
13 | * permissions and limitations under the License. |
14 | */ |
15 | |
16 | #include <aws/core/utils/logging/LogLevel.h> |
17 | |
18 | #include <aws/core/utils/memory/stl/AWSMap.h> |
19 | #include <aws/core/utils/memory/stl/AWSString.h> |
20 | #include <cassert> |
21 | |
22 | using namespace Aws::Utils::Logging; |
23 | |
24 | namespace Aws |
25 | { |
26 | namespace Utils |
27 | { |
28 | namespace Logging |
29 | { |
30 | |
31 | Aws::String GetLogLevelName(LogLevel logLevel) |
32 | { |
33 | switch (logLevel) |
34 | { |
35 | case LogLevel::Fatal: |
36 | return "FATAL" ; |
37 | case LogLevel::Error: |
38 | return "ERROR" ; |
39 | case LogLevel::Warn: |
40 | return "WARN" ; |
41 | case LogLevel::Info: |
42 | return "INFO" ; |
43 | case LogLevel::Debug: |
44 | return "DEBUG" ; |
45 | case LogLevel::Trace: |
46 | return "TRACE" ; |
47 | default: |
48 | assert(0); |
49 | return "" ; |
50 | } |
51 | } |
52 | |
53 | } // namespace Logging |
54 | } // namespace Utils |
55 | } // namespace Aws |
56 | |