• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 The Android Open Source Project
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  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef NLP_SAFT_COMPONENTS_COMMON_MOBILE_LITE_BASE_LOGGING_H_
18 #define NLP_SAFT_COMPONENTS_COMMON_MOBILE_LITE_BASE_LOGGING_H_
19 
20 #ifdef SAFTM_COMPACT_LOGGING
21 
22 // One gets the compact logging only one requests it explicitly, by passing
23 // --define saftm_compact_logging=true on the blaze command-line.
24 #include "lang_id/common/lite_base/compact-logging.h"
25 
26 #else
27 
28 // Otherwise, one gets the standard base/logging.h You should do so, unless you
29 // have a really good reason to switch to the compact logging.
30 #include "base/logging.h"
31 
32 #define SAFTM_LOG LOG
33 #define SAFTM_CHECK CHECK
34 #define SAFTM_CHECK_EQ CHECK_EQ
35 #define SAFTM_CHECK_LT CHECK_LT
36 #define SAFTM_CHECK_LE CHECK_LE
37 #define SAFTM_CHECK_GT CHECK_GT
38 #define SAFTM_CHECK_GE CHECK_GE
39 #define SAFTM_CHECK_NE CHECK_NE
40 
41 #define SAFTM_DLOG DLOG
42 #define SAFTM_DCHECK DCHECK
43 #define SAFTM_DCHECK_EQ DCHECK_EQ
44 #define SAFTM_DCHECK_LT DCHECK_LT
45 #define SAFTM_DCHECK_LE DCHECK_LE
46 #define SAFTM_DCHECK_GT DCHECK_GT
47 #define SAFTM_DCHECK_GE DCHECK_GE
48 #define SAFTM_DCHECK_NE DCHECK_NE
49 
50 #endif  // SAFTM_COMPACT_LOGGING
51 
52 #endif  // NLP_SAFT_COMPONENTS_COMMON_MOBILE_LITE_BASE_LOGGING_H_
53