Home | History | Annotate | Download | only in car
      1 /*
      2  * Copyright (C) 2015 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 package com.android.car;
     18 
     19 public class CarLog {
     20     private static final int MAX_TAG_LEN = 23;
     21 
     22     public static final String TAG_AM = "CAR.AM";
     23     public static final String TAG_APP_FOCUS = "CAR.APP_FOCUS";
     24     public static final String TAG_AUDIO = "CAR.AUDIO";
     25     public static final String TAG_CABIN = "CAR.CABIN";
     26     public static final String TAG_CAMERA = "CAR.CAMERA";
     27     public static final String TAG_CAN_BUS = "CAR.CAN_BUS";
     28     public static final String TAG_CLUSTER = "CAR.CLUSTER";
     29     public static final String TAG_HAL = "CAR.HAL";
     30     public static final String TAG_HVAC = "CAR.HVAC";
     31     public static final String TAG_VENDOR_EXT = "CAR.VENDOR_EXT";
     32     public static final String TAG_INFO = "CAR.INFO";
     33     public static final String TAG_INPUT = "CAR.INPUT";
     34     public static final String TAG_MONITORING = "CAR.MONITORING";
     35     public static final String TAG_NAV = "CAR.NAV";
     36     public static final String TAG_PACKAGE = "CAR.PACKAGE";
     37     public static final String TAG_POWER = "CAR.POWER";
     38     public static final String TAG_PROJECTION = "CAR.PROJECTION";
     39     public static final String TAG_PROPERTY = "CAR.PROPERTY";
     40     public static final String TAG_SENSOR = "CAR.SENSOR";
     41     public static final String TAG_SERVICE = "CAR.SERVICE";
     42     public static final String TAG_SYS = "CAR.SYS";
     43     public static final String TAG_TEST = "CAR.TEST";
     44     public static final String TAG_DIAGNOSTIC = "CAR.DIAGNOSTIC";
     45     public static final String TAG_STORAGE = "CAR.STORAGE";
     46 
     47     public static String concatTag(String tagPrefix, Class clazz) {
     48         String tag = tagPrefix + "." + clazz.getSimpleName();
     49         if (tag.length() > MAX_TAG_LEN) {
     50             tag = tag.substring(0, MAX_TAG_LEN);
     51         }
     52         return tag;
     53     }
     54 }
     55