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 2017/08/14 01:38:18 UTC

logging-log4j2 git commit: Add default implementation.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master adf03f413 -> b41b5cc86


Add default implementation.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b41b5cc8
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b41b5cc8
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b41b5cc8

Branch: refs/heads/master
Commit: b41b5cc861b394beaa60327c030c559885854c83
Parents: adf03f4
Author: Gary Gregory <ga...@gmail.com>
Authored: Sun Aug 13 19:38:09 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sun Aug 13 19:38:09 2017 -0600

----------------------------------------------------------------------
 .../core/DefaultLoggerContextAccessor.java      | 35 ++++++++++++++++++++
 1 file changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b41b5cc8/log4j-core/src/main/java/org/apache/logging/log4j/core/DefaultLoggerContextAccessor.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/DefaultLoggerContextAccessor.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/DefaultLoggerContextAccessor.java
new file mode 100644
index 0000000..1953519
--- /dev/null
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/DefaultLoggerContextAccessor.java
@@ -0,0 +1,35 @@
+/*
+ * 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.logging.log4j.core;
+
+/**
+ * Default implementation using the Core LoggerContext.
+ */
+public class DefaultLoggerContextAccessor implements LoggerContextAccessor {
+
+    /*
+     * Returns the current LoggerContext.
+     * 
+     * @see org.apache.logging.log4j.core.LoggerContextAccessor#getLoggerContext()
+     */
+    @Override
+    public LoggerContext getLoggerContext() {
+        return LoggerContext.getContext();
+    }
+
+}