001/** 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved. 004 * 005 * This program and the accompanying materials are dual-licensed under 006 * either the terms of the Eclipse Public License v1.0 as published by 007 * the Eclipse Foundation 008 * 009 * or (per the licensee's choosing) 010 * 011 * under the terms of the GNU Lesser General Public License version 2.1 012 * as published by the Free Software Foundation. 013 */ 014package ch.qos.logback.classic; 015 016import static ch.qos.logback.core.CoreConstants.JNDI_JAVA_NAMESPACE; 017 018import org.slf4j.Marker; 019import org.slf4j.MarkerFactory; 020 021public class ClassicConstants { 022 public static final String USER_MDC_KEY = "user"; 023 024 public static final String LOGBACK_CONTEXT_SELECTOR = "logback.ContextSelector"; 025 public static final String CONFIG_FILE_PROPERTY = "logback.configurationFile"; 026 027 /** 028 * property name designating the path for the serialized configuration model file 029 * @since 1.3.9/1.4.9 030 */ 031 public static final String MODEL_CONFIG_FILE_PROPERTY = "logback.scmoFile"; 032 033 public static final String JNDI_CONFIGURATION_RESOURCE = JNDI_JAVA_NAMESPACE 034 + "comp/env/logback/configuration-resource"; 035 public static final String JNDI_CONTEXT_NAME = JNDI_JAVA_NAMESPACE + "comp/env/logback/context-name"; 036 037 /** 038 * The maximum number of package separators (dots) that abbreviation algorithms 039 * can handle. Class or logger names with more separators will have their first 040 * MAX_DOTS parts shortened. 041 * 042 * Since 1.3.0, no longer unused 043 */ 044 public static final int MAX_DOTS = 16; 045 046 /** 047 * The default stack data depth computed during caller data extraction. 048 */ 049 public static final int DEFAULT_MAX_CALLEDER_DATA_DEPTH = 8; 050 051 public static final String REQUEST_REMOTE_HOST_MDC_KEY = "req.remoteHost"; 052 public static final String REQUEST_USER_AGENT_MDC_KEY = "req.userAgent"; 053 public static final String REQUEST_REQUEST_URI = "req.requestURI"; 054 public static final String REQUEST_QUERY_STRING = "req.queryString"; 055 public static final String REQUEST_REQUEST_URL = "req.requestURL"; 056 public static final String REQUEST_METHOD = "req.method"; 057 public static final String REQUEST_X_FORWARDED_FOR = "req.xForwardedFor"; 058 059 public static final String GAFFER_CONFIGURATOR_FQCN = "ch.qos.logback.classic.gaffer.GafferConfigurator"; 060 061 public static final String FINALIZE_SESSION = "FINALIZE_SESSION"; 062 public static final Marker FINALIZE_SESSION_MARKER = MarkerFactory.getMarker(FINALIZE_SESSION); 063 final public static String AUTOCONFIG_FILE = "logback.xml"; 064 final public static String TEST_AUTOCONFIG_FILE = "logback-test.xml"; 065 066 public static final String LOGBACK_CLASSIC_VERSION_MESSAGE = "This is logback-classic version "; 067 public static final String LOGBACK_VERSIONS_MISMATCH = "Versions of logback-core and logback-classic are different!"; 068 069}