View Javadoc
1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.classic;
15  
16  import static ch.qos.logback.core.CoreConstants.JNDI_JAVA_NAMESPACE;
17  
18  import org.slf4j.Marker;
19  import org.slf4j.MarkerFactory;
20  
21  public class ClassicConstants {
22      public static final String USER_MDC_KEY = "user";
23  
24      public static final String LOGBACK_CONTEXT_SELECTOR = "logback.ContextSelector";
25      public static final String CONFIG_FILE_PROPERTY = "logback.configurationFile";
26  
27      /**
28       * property name designating the path for the serialized configuration model file
29       * @since 1.3.9/1.4.9
30       */
31      public static final String MODEL_CONFIG_FILE_PROPERTY = "logback.scmoFile";
32  
33      public static final String JNDI_CONFIGURATION_RESOURCE = JNDI_JAVA_NAMESPACE
34              + "comp/env/logback/configuration-resource";
35      public static final String JNDI_CONTEXT_NAME = JNDI_JAVA_NAMESPACE + "comp/env/logback/context-name";
36  
37      /**
38       * The maximum number of package separators (dots) that abbreviation algorithms
39       * can handle. Class or logger names with more separators will have their first
40       * MAX_DOTS parts shortened.
41       * 
42       * Since 1.3.0, no longer unused
43       */
44      public static final int MAX_DOTS = 16;
45  
46      /**
47       * The default stack data depth computed during caller data extraction.
48       */
49      public static final int DEFAULT_MAX_CALLEDER_DATA_DEPTH = 8;
50  
51      public static final String REQUEST_REMOTE_HOST_MDC_KEY = "req.remoteHost";
52      public static final String REQUEST_USER_AGENT_MDC_KEY = "req.userAgent";
53      public static final String REQUEST_REQUEST_URI = "req.requestURI";
54      public static final String REQUEST_QUERY_STRING = "req.queryString";
55      public static final String REQUEST_REQUEST_URL = "req.requestURL";
56      public static final String REQUEST_METHOD = "req.method";
57      public static final String REQUEST_X_FORWARDED_FOR = "req.xForwardedFor";
58  
59      public static final String GAFFER_CONFIGURATOR_FQCN = "ch.qos.logback.classic.gaffer.GafferConfigurator";
60  
61      public static final String FINALIZE_SESSION = "FINALIZE_SESSION";
62      public static final Marker FINALIZE_SESSION_MARKER = MarkerFactory.getMarker(FINALIZE_SESSION);
63      final public static String AUTOCONFIG_FILE = "logback.xml";
64      final public static String TEST_AUTOCONFIG_FILE = "logback-test.xml";
65  }