You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2022/01/04 23:21:32 UTC
[logging-log4j2] 01/02: Log4j 1.2 bridge adds org.apache.log4j.component.helpers.Constants.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit ff4426eb1f935f7cdb73a88050929dff33b94249
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jan 4 18:15:00 2022 -0500
Log4j 1.2 bridge adds org.apache.log4j.component.helpers.Constants.
Resolve a common use-case of the jar hell created by Log4j 1's own log4j
extras component whose jar includes a copy of Log4j 1. Log4j 1 extras is
https://logging.apache.org/log4j/extras/
The goal is to be able to use the 1.2 bridge without log4j extras on the
classpath.
---
.../apache/log4j/component/helpers/Constants.java | 126 +++++++++++++++++++++
1 file changed, 126 insertions(+)
diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/component/helpers/Constants.java b/log4j-1.2-api/src/main/java/org/apache/log4j/component/helpers/Constants.java
new file mode 100644
index 0000000..9a41b2c
--- /dev/null
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/component/helpers/Constants.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+
+package org.apache.log4j.component.helpers;
+
+
+/**
+ * Constants used internally throughout log4j.
+ *
+ */
+public interface Constants {
+
+ /**
+ * log4j package name string literal.
+ */
+ String LOG4J_PACKAGE_NAME = "org.apache.log4j";
+
+ /**
+ * The name of the default repository is "default" (without the quotes).
+ */
+ String DEFAULT_REPOSITORY_NAME = "default";
+
+ /**
+ * application string literal.
+ */
+ String APPLICATION_KEY = "application";
+ /**
+ * hostname string literal.
+ */
+ String HOSTNAME_KEY = "hostname";
+ /**
+ * receiver string literal.
+ */
+ String RECEIVER_NAME_KEY = "receiver";
+ /**
+ * log4jid string literal.
+ */
+ String LOG4J_ID_KEY = "log4jid";
+ /**
+ * time stamp pattern string literal.
+ */
+ String TIMESTAMP_RULE_FORMAT = "yyyy/MM/dd HH:mm:ss";
+
+ /**
+ * The default property file name for automatic configuration.
+ */
+ String DEFAULT_CONFIGURATION_FILE = "log4j.properties";
+ /**
+ * The default XML configuration file name for automatic configuration.
+ */
+ String DEFAULT_XML_CONFIGURATION_FILE = "log4j.xml";
+ /**
+ * log4j.configuration string literal.
+ */
+ String DEFAULT_CONFIGURATION_KEY = "log4j.configuration";
+ /**
+ * log4j.configuratorClass string literal.
+ */
+ String CONFIGURATOR_CLASS_KEY = "log4j.configuratorClass";
+
+ /**
+ * JNDI context name string literal.
+ */
+ String JNDI_CONTEXT_NAME = "java:comp/env/log4j/context-name";
+
+ /**
+ * TEMP_LIST_APPENDER string literal.
+ */
+ String TEMP_LIST_APPENDER_NAME = "TEMP_LIST_APPENDER";
+ /**
+ * TEMP_CONSOLE_APPENDER string literal.
+ */
+ String TEMP_CONSOLE_APPENDER_NAME = "TEMP_CONSOLE_APPENDER";
+ /**
+ * Codes URL string literal.
+ */
+ String CODES_HREF =
+ "http://logging.apache.org/log4j/docs/codes.html";
+
+
+ /**
+ * ABSOLUTE string literal.
+ */
+ String ABSOLUTE_FORMAT = "ABSOLUTE";
+ /**
+ * SimpleTimePattern for ABSOLUTE.
+ */
+ String ABSOLUTE_TIME_PATTERN = "HH:mm:ss,SSS";
+
+ /**
+ * SimpleTimePattern for ABSOLUTE.
+ */
+ String SIMPLE_TIME_PATTERN = "HH:mm:ss";
+
+ /**
+ * DATE string literal.
+ */
+ String DATE_AND_TIME_FORMAT = "DATE";
+ /**
+ * SimpleTimePattern for DATE.
+ */
+ String DATE_AND_TIME_PATTERN = "dd MMM yyyy HH:mm:ss,SSS";
+
+ /**
+ * ISO8601 string literal.
+ */
+ String ISO8601_FORMAT = "ISO8601";
+ /**
+ * SimpleTimePattern for ISO8601.
+ */
+ String ISO8601_PATTERN = "yyyy-MM-dd HH:mm:ss,SSS";
+}