(logging-chainsaw) branch master updated: Add VFSLogFilePatternReceiver, minor tweaks to LogFilePatternReceiver
This is an automated email from the ASF dual-hosted git repository. sdeboy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new 8763fec Add VFSLogFilePatternReceiver, minor tweaks to LogFilePatternReceiver 8763fec is described below commit 8763fecca588f0503832c85a505987001de2c589 Author: sdeboy AuthorDate: Tue Nov 28 18:46:12 2023 -0800 Add VFSLogFilePatternReceiver, minor tweaks to LogFilePatternReceiver --- .../vfs/VFSLogFilePatternReceiverFactory.java | 144 + .../apache/log4j/varia/LogFilePatternReceiver.java | 101 +++ ...log4j.chainsaw.receiver.ChainsawReceiverFactory | 1 + 3 files changed, 191 insertions(+), 55 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiverFactory.java b/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiverFactory.java new file mode 100644 index 000..8aeec19 --- /dev/null +++ b/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiverFactory.java @@ -0,0 +1,144 @@ +/* + * 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.chainsaw.vfs; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import org.apache.log4j.chainsaw.receiver.ChainsawReceiver; +import org.apache.log4j.chainsaw.receiver.ChainsawReceiverFactory; +import org.apache.log4j.varia.LogFilePatternReceiver; + +/** + * + */ +public class VFSLogFilePatternReceiverFactory implements ChainsawReceiverFactory { + +@Override +public ChainsawReceiver create() { +return new VFSLogFilePatternReceiver(); +} + +@Override +public PropertyDescriptor[] getPropertyDescriptors() throws IntrospectionException { +return new PropertyDescriptor[]{ +new PropertyDescriptor("name", LogFilePatternReceiver.class), +new PropertyDescriptor("fileURL", LogFilePatternReceiver.class), +new PropertyDescriptor("appendNonMatches", LogFilePatternReceiver.class), +new PropertyDescriptor("filterExpression", LogFilePatternReceiver.class), +new PropertyDescriptor("tailing", LogFilePatternReceiver.class), +new PropertyDescriptor("logFormat", LogFilePatternReceiver.class), +new PropertyDescriptor("group", LogFilePatternReceiver.class), +new PropertyDescriptor("timestampFormat", LogFilePatternReceiver.class), +new PropertyDescriptor("waitMillis", LogFilePatternReceiver.class), +}; +} + +@Override +public String getReceiverName() { +return "VFSLogFilePatternReceiver"; +} + +@Override +public String getReceiverDocumentation() { +return "VFSLogFilePatternReceiver can parse and tail log files, converting entries into\n" + +"LoggingEvents. If the file doesn't exist when the receiver is initialized, the\n" + +"receiver will look for the file once every 10 seconds.\n" + +"\n" + +"This receiver relies on java.util.regex features to perform the parsing of text in the\n" + +"log file, however the only regular expression field explicitly supported is\n" + +" * a glob-style wildcard used to ignore fields in the log file if needed. All other\n" + +"fields are parsed by using the supplied keywords.\n" + +"\n" + +"Features:\n" + +"- specify the URL of the log file to be processed\n" + +"- specify the timestamp format in the file (if one exists, using patterns from {@link java.text.SimpleDateFormat})\n" + +"- specify the pattern (logFormat) used in the log file using keywords, a wildcard character (*) and fixed text\n" + +"- 'tail' the file (allows the contents of the file to be continually read and new events processed)\n" + +"- supports the parsing of multi-line messages and exceptions\n" + +"- 'hostname' property set to URL host (or 'file' if not available)\n" + +"- 'application' property set to URL path (or value of fileURL if not available)\n" + +"- 'group' property can be set to associate multiple log file receivers\n" + +"\n" + +"Keywords:\n" + +"TIMESTAMP\n" + +"LOGGER\n" + +"LEVEL\n" + +"THREAD\n" +
(logging-log4cxx) branch logger_removal updated (dc330822 -> 05506f0b)
This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a change to branch logger_removal in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git from dc330822 Add implicit conversion to bool to LoggerInstancePtr add 05506f0b Make LoggerInstancePtr more interchangable with LoggerPtr No new revisions were added by this update. Summary of changes: src/main/include/log4cxx/loggerinstance.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)
(logging-log4cxx) branch logger_removal updated (13f9395b -> dc330822)
This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a change to branch logger_removal in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git from 13f9395b Improve documentation consistency add dc330822 Add implicit conversion to bool to LoggerInstancePtr No new revisions were added by this update. Summary of changes: src/main/include/log4cxx/loggerinstance.h | 10 -- src/test/cpp/loggertestcase.cpp | 1 + 2 files changed, 9 insertions(+), 2 deletions(-)
(logging-log4cxx) branch logger_removal updated (73655614 -> 13f9395b)
This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a change to branch logger_removal in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git from 73655614 Add a reset method to LoggerInstancePtr add 13f9395b Improve documentation consistency No new revisions were added by this update. Summary of changes: src/main/include/log4cxx/loggerinstance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(logging-log4cxx) branch logger_removal updated (1f9a6efc -> 73655614)
This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a change to branch logger_removal in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git from 1f9a6efc Add a reset method to LoggerInstancePtr add 73655614 Add a reset method to LoggerInstancePtr No new revisions were added by this update. Summary of changes: src/main/include/log4cxx/loggerinstance.h | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-)
(logging-chainsaw) branch master updated: fix splitpane rendering issues w/continuous layout
This is an automated email from the ASF dual-hosted git repository. sdeboy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new e30efbf fix splitpane rendering issues w/continuous layout e30efbf is described below commit e30efbfe8a915cb133400c17fdb3f65241e3fc0e Author: sdeboy AuthorDate: Tue Nov 28 17:04:02 2023 -0800 fix splitpane rendering issues w/continuous layout --- src/main/java/org/apache/log4j/chainsaw/LogUI.java | 1 + .../java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/org/apache/log4j/chainsaw/LogUI.java b/src/main/java/org/apache/log4j/chainsaw/LogUI.java index ebda1c4..ce263ae 100644 --- a/src/main/java/org/apache/log4j/chainsaw/LogUI.java +++ b/src/main/java/org/apache/log4j/chainsaw/LogUI.java @@ -471,6 +471,7 @@ public class LogUI extends JFrame { getContentPane().add(statusBar, BorderLayout.SOUTH); mainReceiverSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panePanel, receiversPanel); +mainReceiverSplitPane.setContinuousLayout(true); dividerSize = mainReceiverSplitPane.getDividerSize(); mainReceiverSplitPane.setDividerLocation(-1); diff --git a/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java b/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java index 87cf36a..f3b0bef 100644 --- a/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java +++ b/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java @@ -1213,6 +1213,7 @@ public class LogPanel extends DockablePanel implements ChainsawEventBatchListene */ nameTreeAndMainPanelSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, logTreePanel, lowerPanel); nameTreeAndMainPanelSplit.setDividerLocation(-1); +nameTreeAndMainPanelSplit.setContinuousLayout(true); add(nameTreeAndMainPanelSplit, BorderLayout.CENTER);
(logging-log4cxx) branch logger_removal updated (c0c212b6 -> 1f9a6efc)
This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a change to branch logger_removal in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git from c0c212b6 Link to LoggerRepository in LoggerInstance docs add 1f9a6efc Add a reset method to LoggerInstancePtr No new revisions were added by this update. Summary of changes: src/main/include/log4cxx/loggerinstance.h | 12 +++- src/test/cpp/loggertestcase.cpp | 5 + 2 files changed, 16 insertions(+), 1 deletion(-)
(logging-chainsaw) branch master updated: removed unused LoggerNameTree
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new f2395b5 removed unused LoggerNameTree f2395b5 is described below commit f2395b5729a72c4353862d061a586400326d79ac Author: Christian Grobmeier AuthorDate: Tue Nov 28 23:16:50 2023 +0100 removed unused LoggerNameTree --- .../org/apache/log4j/chainsaw/LoggerNameTree.java | 51 -- 1 file changed, 51 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/LoggerNameTree.java b/src/main/java/org/apache/log4j/chainsaw/LoggerNameTree.java deleted file mode 100644 index c252b84..000 --- a/src/main/java/org/apache/log4j/chainsaw/LoggerNameTree.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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.chainsaw; - -import javax.swing.*; -import javax.swing.tree.DefaultMutableTreeNode; -import javax.swing.tree.TreeModel; - - -/** - * LoggerNameTree is used to display a TreeModel of LoggerNames. - * - * @author Paul Smith psm...@apache.org - */ -public class LoggerNameTree extends JTree { -LoggerNameTree(TreeModel model) { -super(model); - - -// -//TODO remove this WIP node once we're statisfied -DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot(); - -DefaultMutableTreeNode node = -new DefaultMutableTreeNode("Work in Progress..."); -node.setAllowsChildren(false); - -root.add(node); - - -} - - -}
(logging-chainsaw) branch master updated: moved file related actions to their own package
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new cccd990 moved file related actions to their own package cccd990 is described below commit cccd990a26848963744e22a95da8893948b695ca Author: Christian Grobmeier AuthorDate: Tue Nov 28 23:15:11 2023 +0100 moved file related actions to their own package --- .../java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java | 1 + src/main/java/org/apache/log4j/chainsaw/LogUI.java | 2 +- .../org/apache/log4j/chainsaw/{ => file}/FileLoadAction.java | 0 src/main/java/org/apache/log4j/chainsaw/{ => file}/FileMenu.java | 9 + .../org/apache/log4j/chainsaw/{ => file}/FileSaveAction.java | 4 +++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java b/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java index d02c965..e01f5df 100644 --- a/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java +++ b/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java @@ -22,6 +22,7 @@ import org.apache.commons.configuration2.event.ConfigurationEvent; import org.apache.log4j.chainsaw.components.elements.SmallButton; import org.apache.log4j.chainsaw.components.elements.SmallToggleButton; import org.apache.log4j.chainsaw.components.logpanel.LogPanel; +import org.apache.log4j.chainsaw.file.FileMenu; import org.apache.log4j.chainsaw.filter.FilterModel; import org.apache.log4j.chainsaw.help.HelpManager; import org.apache.log4j.chainsaw.icons.ChainsawIcons; diff --git a/src/main/java/org/apache/log4j/chainsaw/LogUI.java b/src/main/java/org/apache/log4j/chainsaw/LogUI.java index 139169b..ebda1c4 100644 --- a/src/main/java/org/apache/log4j/chainsaw/LogUI.java +++ b/src/main/java/org/apache/log4j/chainsaw/LogUI.java @@ -1305,7 +1305,7 @@ public class LogUI extends JFrame { * * @return current log panel */ -LogPanel getCurrentLogPanel() { +public LogPanel getCurrentLogPanel() { Component selectedTab = getTabbedPane().getSelectedComponent(); if (selectedTab instanceof LogPanel) { diff --git a/src/main/java/org/apache/log4j/chainsaw/FileLoadAction.java b/src/main/java/org/apache/log4j/chainsaw/file/FileLoadAction.java similarity index 100% rename from src/main/java/org/apache/log4j/chainsaw/FileLoadAction.java rename to src/main/java/org/apache/log4j/chainsaw/file/FileLoadAction.java diff --git a/src/main/java/org/apache/log4j/chainsaw/FileMenu.java b/src/main/java/org/apache/log4j/chainsaw/file/FileMenu.java similarity index 96% rename from src/main/java/org/apache/log4j/chainsaw/FileMenu.java rename to src/main/java/org/apache/log4j/chainsaw/file/FileMenu.java index 9dad1bc..2ab099f 100644 --- a/src/main/java/org/apache/log4j/chainsaw/FileMenu.java +++ b/src/main/java/org/apache/log4j/chainsaw/file/FileMenu.java @@ -19,8 +19,9 @@ * @author Paul Smith psm...@apache.org * */ -package org.apache.log4j.chainsaw; +package org.apache.log4j.chainsaw.file; +import org.apache.log4j.chainsaw.LogUI; import org.apache.log4j.chainsaw.icons.ChainsawIcons; import org.apache.log4j.chainsaw.osx.OSXIntegration; import org.apache.log4j.chainsaw.prefs.MRUFileList; @@ -41,7 +42,7 @@ import java.net.URL; * @author Paul Smith psm...@apache.org * @author Scott Deboy sde...@apache.org */ -class FileMenu extends JMenu { +public class FileMenu extends JMenu { private final Action loadReceiverAction; private final Action exitAction; private final Action loadLog4JAction; @@ -160,7 +161,7 @@ class FileMenu extends JMenu { } } -Action getLog4JFileOpenAction() { +public Action getLog4JFileOpenAction() { return loadLog4JAction; } @@ -168,7 +169,7 @@ class FileMenu extends JMenu { return loadUtilLoggingAction; } -Action getFileSaveAction() { +public Action getFileSaveAction() { return saveAction; } diff --git a/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java b/src/main/java/org/apache/log4j/chainsaw/file/FileSaveAction.java similarity index 97% rename from src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java rename to src/main/java/org/apache/log4j/chainsaw/file/FileSaveAction.java index 8429191..1b6c1f6 100644 --- a/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java +++ b/src/main/java/org/apache/log4j/chainsaw/file/FileSaveAction.java @@ -15,8 +15,10 @@ * limitations under the License. */ -package org.apache.log4j.chainsaw; +package org.apache.log4j.chainsaw.file; +import org.apache.log4j.chainsaw.LogUI; +import org.apache.log4j.chainsaw.LoggingEventWrapper; import org.apache.log4j.chainsaw.icons.ChainsawIcons; import javax.swing.*;
(logging-chainsaw) branch master updated: moved jsorttable to elements package
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new b674cd3 moved jsorttable to elements package b674cd3 is described below commit b674cd347218007017f88ae325a9c75d73fa1255 Author: Christian Grobmeier AuthorDate: Tue Nov 28 23:10:14 2023 +0100 moved jsorttable to elements package --- src/main/java/org/apache/log4j/chainsaw/LoggingEventWrapper.java | 3 +-- src/main/java/org/apache/log4j/chainsaw/SortHeaderRenderer.java | 2 ++ .../apache/log4j/chainsaw/{ => components/elements}/JSortTable.java | 5 - .../java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/LoggingEventWrapper.java b/src/main/java/org/apache/log4j/chainsaw/LoggingEventWrapper.java index cb6209f..8e92bbd 100644 --- a/src/main/java/org/apache/log4j/chainsaw/LoggingEventWrapper.java +++ b/src/main/java/org/apache/log4j/chainsaw/LoggingEventWrapper.java @@ -16,17 +16,16 @@ */ package org.apache.log4j.chainsaw; +import org.apache.log4j.chainsaw.logevents.ChainsawLoggingEvent; import org.apache.log4j.helpers.Constants; import org.apache.log4j.rule.Rule; import java.awt.*; import java.time.Instant; -import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit; import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.log4j.chainsaw.logevents.ChainsawLoggingEvent; /** * Wrap access to a LoggingEvent. All property updates need to go through this object and not through the wrapped logging event, diff --git a/src/main/java/org/apache/log4j/chainsaw/SortHeaderRenderer.java b/src/main/java/org/apache/log4j/chainsaw/SortHeaderRenderer.java index ad47c47..32f6caa 100644 --- a/src/main/java/org/apache/log4j/chainsaw/SortHeaderRenderer.java +++ b/src/main/java/org/apache/log4j/chainsaw/SortHeaderRenderer.java @@ -17,6 +17,8 @@ package org.apache.log4j.chainsaw; +import org.apache.log4j.chainsaw.components.elements.JSortTable; + import javax.swing.*; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.JTableHeader; diff --git a/src/main/java/org/apache/log4j/chainsaw/JSortTable.java b/src/main/java/org/apache/log4j/chainsaw/components/elements/JSortTable.java similarity index 96% rename from src/main/java/org/apache/log4j/chainsaw/JSortTable.java rename to src/main/java/org/apache/log4j/chainsaw/components/elements/JSortTable.java index 840e0d0..5d1c807 100644 --- a/src/main/java/org/apache/log4j/chainsaw/JSortTable.java +++ b/src/main/java/org/apache/log4j/chainsaw/components/elements/JSortTable.java @@ -15,8 +15,11 @@ * limitations under the License. */ -package org.apache.log4j.chainsaw; +package org.apache.log4j.chainsaw.components.elements; +import org.apache.log4j.chainsaw.ChainsawColumns; +import org.apache.log4j.chainsaw.SortHeaderRenderer; +import org.apache.log4j.chainsaw.SortTableModel; import org.apache.log4j.chainsaw.helper.SwingHelper; import javax.swing.JTable; diff --git a/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java b/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java index 1a41317..87cf36a 100644 --- a/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java +++ b/src/main/java/org/apache/log4j/chainsaw/components/logpanel/LogPanel.java @@ -21,6 +21,7 @@ import org.apache.commons.configuration2.event.EventListener; import org.apache.log4j.chainsaw.*; import org.apache.log4j.chainsaw.color.ColorPanel; import org.apache.log4j.chainsaw.color.RuleColorizer; +import org.apache.log4j.chainsaw.components.elements.JSortTable; import org.apache.log4j.chainsaw.components.elements.SmallButton; import org.apache.log4j.chainsaw.components.elements.SmallToggleButton; import org.apache.log4j.chainsaw.filter.FilterModel;
(logging-chainsaw) 01/02: moed receivers to their own package
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit d7314d7249a6127f92c2192b1fadce77225735f8 Author: Christian Grobmeier AuthorDate: Tue Nov 28 23:02:04 2023 +0100 moed receivers to their own package --- .../apache/log4j/chainsaw/ChainsawAppender.java| 8 +++-- .../log4j/chainsaw/ChainsawReceiverNode.java | 29 --- .../java/org/apache/log4j/chainsaw/Generator.java | 1 + src/main/java/org/apache/log4j/chainsaw/LogUI.java | 2 ++ .../log4j/chainsaw/ReceiverEventListener.java | 2 ++ .../chainsaw/components/logpanel/LogPanel.java | 1 + .../log4j/chainsaw/prefs/SettingsManager.java | 4 +-- .../chainsaw/{ => receiver}/ChainsawReceiver.java | 41 +++--- .../{ => receiver}/ChainsawReceiverFactory.java| 10 +++--- .../{ => receiver}/ChainsawReceiverSkeleton.java | 11 +++--- .../chainsaw/receivers/NewReceiverDialogPanel.java | 4 +-- .../receivers/PluginPropertyEditorPanel.java | 11 ++ .../receivers/ReceiverTreeCellRenderer.java| 2 +- .../log4j/chainsaw/receivers/ReceiversPanel.java | 4 +-- .../chainsaw/receivers/ReceiversTreeModel.java | 5 ++- .../log4j/chainsaw/zeroconf/ZeroConfPlugin.java| 2 +- .../java/org/apache/log4j/net/JsonReceiver.java| 2 +- .../org/apache/log4j/net/JsonReceiverFactory.java | 4 +-- .../org/apache/log4j/net/MulticastReceiver.java| 2 +- .../apache/log4j/net/MulticastReceiverFactory.java | 4 +-- .../java/org/apache/log4j/net/UDPReceiver.java | 2 +- .../org/apache/log4j/net/UDPReceiverFactory.java | 4 +-- .../org/apache/log4j/net/XMLReceiverFactory.java | 4 +-- .../org/apache/log4j/net/XMLSocketReceiver.java| 2 +- .../apache/log4j/varia/LogFilePatternReceiver.java | 2 +- .../log4j/varia/LogFilePatternReceiverFactory.java | 4 +-- .../org/apache/log4j/xml/LogFileXMLReceiver.java | 2 +- ...og4j.chainsaw.receiver.ChainsawReceiverFactory} | 0 28 files changed, 70 insertions(+), 99 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/ChainsawAppender.java b/src/main/java/org/apache/log4j/chainsaw/ChainsawAppender.java index ebe366b..9d41f58 100755 --- a/src/main/java/org/apache/log4j/chainsaw/ChainsawAppender.java +++ b/src/main/java/org/apache/log4j/chainsaw/ChainsawAppender.java @@ -18,6 +18,8 @@ package org.apache.log4j.chainsaw; import java.time.Instant; import org.apache.log4j.chainsaw.logevents.ChainsawLoggingEventBuilder; +import org.apache.log4j.chainsaw.receiver.ChainsawReceiver; +import org.apache.log4j.chainsaw.receiver.ChainsawReceiverSkeleton; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender; import org.apache.logging.log4j.core.config.plugins.Plugin; @@ -27,7 +29,7 @@ import org.apache.logging.log4j.core.config.plugins.PluginFactory; @Plugin(name = "ChainsawAppender", category = "Core", elementType = "appender", printObject = true) public final class ChainsawAppender extends AbstractOutputStreamAppender { -private ChainsawAppenderReceiver m_receiver = new ChainsawAppenderReceiver(); +private ChainsawAppenderReceiver receiver = new ChainsawAppenderReceiver(); private ChainsawAppender(String name) { super(name, null, null, true, true, null); @@ -55,11 +57,11 @@ public final class ChainsawAppender extends AbstractOutputStreamAppender { .setThreadName( event.getThreadName() ) .setTimestamp( Instant.ofEpochMilli(event.getInstant().getEpochMillisecond()) ); -m_receiver.append(builder.create()); +receiver.append(builder.create()); } public ChainsawReceiver getReceiver(){ -return m_receiver; +return receiver; } class ChainsawAppenderReceiver extends ChainsawReceiverSkeleton { diff --git a/src/main/java/org/apache/log4j/chainsaw/ChainsawReceiverNode.java b/src/main/java/org/apache/log4j/chainsaw/ChainsawReceiverNode.java deleted file mode 100644 index ea1d748..000 --- a/src/main/java/org/apache/log4j/chainsaw/ChainsawReceiverNode.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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
(logging-chainsaw) 02/02: removed unused classes ThresholdSlider and ThrowableRenderPanel
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit da477bdd7a8dc20968b0d49252908ad3b3c8e42e Author: Christian Grobmeier AuthorDate: Tue Nov 28 23:04:35 2023 +0100 removed unused classes ThresholdSlider and ThrowableRenderPanel --- .../org/apache/log4j/chainsaw/ThresholdSlider.java | 94 --- .../log4j/chainsaw/ThrowableRenderPanel.java | 101 - 2 files changed, 195 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/ThresholdSlider.java b/src/main/java/org/apache/log4j/chainsaw/ThresholdSlider.java deleted file mode 100644 index 199aeaf..000 --- a/src/main/java/org/apache/log4j/chainsaw/ThresholdSlider.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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.chainsaw; - -import org.apache.log4j.chainsaw.logevents.Level; - -import javax.swing.*; -import java.util.Arrays; -import java.util.Collections; -import java.util.Hashtable; -import java.util.List; - - -/** - * A Slider implementation that allows a user to - * choose a particular Threshold - * . - * - * @author Paul Smith psm...@apache.org - */ -final class ThresholdSlider extends JSlider { -final List priorityList; - -ThresholdSlider() { -Level[] levels = -new Level[]{ -Level.OFF, Level.FATAL, Level.ERROR, Level.WARN, Level.INFO, -Level.DEBUG, Level.TRACE, Level.ALL -}; - -priorityList = Arrays.asList(levels); -Collections.sort(priorityList); - -setModel( -new DefaultBoundedRangeModel( -priorityList.indexOf(Level.TRACE), 0, 0, priorityList.size() - 1)); - -Hashtable labelMap = new Hashtable<>(); - -for (Object aPriorityList : priorityList) { -Level item = (Level) aPriorityList; -labelMap.put( -priorityList.indexOf(item), new JLabel(item.toString())); - -// System.out.println("creating levels for :: " + item.toInt() + "," + item.toString()); -} - -setOrientation(SwingConstants.VERTICAL); -setInverted(true); -setLabelTable(labelMap); - -setPaintLabels(true); - -//setPaintTicks(true); -setSnapToTicks(true); - -//setMajorTickSpacing(1); -//setPaintTrack(true); -} - -void setChosenLevel(Level level) { -setValue(priorityList.indexOf(level)); -} - -/** - * Returns the Log4j Level that is currently selected in this slider - * - * @return - */ -Level getSelectedLevel() { -Level level = (Level) priorityList.get(getValue()); - -if (level == null) { -level = Level.TRACE; -} - -return level; -} -} diff --git a/src/main/java/org/apache/log4j/chainsaw/ThrowableRenderPanel.java b/src/main/java/org/apache/log4j/chainsaw/ThrowableRenderPanel.java deleted file mode 100644 index e2514fc..000 --- a/src/main/java/org/apache/log4j/chainsaw/ThrowableRenderPanel.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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. - */ - -/* - * Created on 11/09/2003 - * - * To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package
(logging-chainsaw) branch master updated (02e2e96 -> da477bd)
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git from 02e2e96 added name to logger new d7314d7 moed receivers to their own package new da477bd removed unused classes ThresholdSlider and ThrowableRenderPanel The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/log4j/chainsaw/ChainsawAppender.java| 8 +- .../log4j/chainsaw/ChainsawReceiverNode.java | 29 -- .../java/org/apache/log4j/chainsaw/Generator.java | 1 + src/main/java/org/apache/log4j/chainsaw/LogUI.java | 2 + .../log4j/chainsaw/ReceiverEventListener.java | 2 + .../org/apache/log4j/chainsaw/ThresholdSlider.java | 94 --- .../log4j/chainsaw/ThrowableRenderPanel.java | 101 - .../chainsaw/components/logpanel/LogPanel.java | 1 + .../log4j/chainsaw/prefs/SettingsManager.java | 4 +- .../chainsaw/{ => receiver}/ChainsawReceiver.java | 41 - .../{ => receiver}/ChainsawReceiverFactory.java| 10 +- .../{ => receiver}/ChainsawReceiverSkeleton.java | 11 ++- .../chainsaw/receivers/NewReceiverDialogPanel.java | 4 +- .../receivers/PluginPropertyEditorPanel.java | 11 +-- .../receivers/ReceiverTreeCellRenderer.java| 2 +- .../log4j/chainsaw/receivers/ReceiversPanel.java | 4 +- .../chainsaw/receivers/ReceiversTreeModel.java | 5 +- .../log4j/chainsaw/zeroconf/ZeroConfPlugin.java| 2 +- .../java/org/apache/log4j/net/JsonReceiver.java| 2 +- .../org/apache/log4j/net/JsonReceiverFactory.java | 4 +- .../org/apache/log4j/net/MulticastReceiver.java| 2 +- .../apache/log4j/net/MulticastReceiverFactory.java | 4 +- .../java/org/apache/log4j/net/UDPReceiver.java | 2 +- .../org/apache/log4j/net/UDPReceiverFactory.java | 4 +- .../org/apache/log4j/net/XMLReceiverFactory.java | 4 +- .../org/apache/log4j/net/XMLSocketReceiver.java| 2 +- .../apache/log4j/varia/LogFilePatternReceiver.java | 2 +- .../log4j/varia/LogFilePatternReceiverFactory.java | 4 +- .../org/apache/log4j/xml/LogFileXMLReceiver.java | 2 +- ...og4j.chainsaw.receiver.ChainsawReceiverFactory} | 0 30 files changed, 70 insertions(+), 294 deletions(-) delete mode 100644 src/main/java/org/apache/log4j/chainsaw/ChainsawReceiverNode.java delete mode 100644 src/main/java/org/apache/log4j/chainsaw/ThresholdSlider.java delete mode 100644 src/main/java/org/apache/log4j/chainsaw/ThrowableRenderPanel.java rename src/main/java/org/apache/log4j/chainsaw/{ => receiver}/ChainsawReceiver.java (61%) rename src/main/java/org/apache/log4j/chainsaw/{ => receiver}/ChainsawReceiverFactory.java (85%) rename src/main/java/org/apache/log4j/chainsaw/{ => receiver}/ChainsawReceiverSkeleton.java (97%) rename src/main/resources/META-INF/services/{org.apache.log4j.chainsaw.ChainsawReceiverFactory => org.apache.log4j.chainsaw.receiver.ChainsawReceiverFactory} (100%)
(logging-chainsaw) branch master updated (0c094ac -> 02e2e96)
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git from 0c094ac reformat, removed final from static new af86728 removed unused debugging comment new 02e2e96 added name to logger The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java | 2 +- src/main/java/org/apache/log4j/chainsaw/BasicPrefPanel.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
(logging-chainsaw) 02/02: added name to logger
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit 02e2e966d71aab5f58db8d1c15ce14c636b58c20 Author: Christian Grobmeier AuthorDate: Tue Nov 28 22:57:33 2023 +0100 added name to logger --- .../java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java b/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java index d1dbd4d..046b764 100644 --- a/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java +++ b/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java @@ -41,7 +41,7 @@ import org.apache.log4j.chainsaw.prefs.SettingsManager; * @author Paul Smith psm...@apache.org */ public class ApplicationPreferenceModelPanel extends AbstractPreferencePanel { -private static final Logger logger = LogManager.getLogger(); +private static final Logger logger = LogManager.getLogger(ApplicationPreferenceModelPanel.class); private JTextField toolTipDisplayMillis; private JTextField cyclicBufferSize;
(logging-chainsaw) 01/02: removed unused debugging comment
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit af8672846d420f54cd09087874128718de1bb905 Author: Christian Grobmeier AuthorDate: Tue Nov 28 22:57:24 2023 +0100 removed unused debugging comment --- src/main/java/org/apache/log4j/chainsaw/BasicPrefPanel.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/BasicPrefPanel.java b/src/main/java/org/apache/log4j/chainsaw/BasicPrefPanel.java index 707b23e..fabc1d0 100644 --- a/src/main/java/org/apache/log4j/chainsaw/BasicPrefPanel.java +++ b/src/main/java/org/apache/log4j/chainsaw/BasicPrefPanel.java @@ -29,7 +29,6 @@ public abstract class BasicPrefPanel extends JPanel { private String title; protected BasicPrefPanel(String title) { -// setBorder(BorderFactory.createLineBorder(Color.red)); this.title = title; }
(logging-chainsaw) 01/02: moved welcome panelt to its own package, removed unused methods
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit f203bc4daa5ebed79900b34a9623acf6035391d0 Author: Christian Grobmeier AuthorDate: Tue Nov 28 22:56:05 2023 +0100 moved welcome panelt to its own package, removed unused methods --- src/main/java/org/apache/log4j/chainsaw/LogUI.java | 21 + .../{ => components/welcome}/WelcomePanel.java | 6 -- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/LogUI.java b/src/main/java/org/apache/log4j/chainsaw/LogUI.java index ff531fb..0543222 100644 --- a/src/main/java/org/apache/log4j/chainsaw/LogUI.java +++ b/src/main/java/org/apache/log4j/chainsaw/LogUI.java @@ -23,6 +23,7 @@ import org.apache.log4j.chainsaw.color.RuleColorizer; import org.apache.log4j.chainsaw.components.elements.SmallButton; import org.apache.log4j.chainsaw.components.elements.SmallToggleButton; import org.apache.log4j.chainsaw.components.logpanel.LogPanel; +import org.apache.log4j.chainsaw.components.welcome.WelcomePanel; import org.apache.log4j.chainsaw.dnd.FileDnDTarget; import org.apache.log4j.chainsaw.help.HelpManager; import org.apache.log4j.chainsaw.helper.SwingHelper; @@ -1340,26 +1341,6 @@ public class LogUI extends JFrame { } } -/** - * Causes the Welcome Panel to become visible, and shows the URL specified as - * it's contents - * - * @param url for content to show - */ -public void showHelp(URL url) { -ensureWelcomePanelVisible(); -//TODO ensure the Welcome Panel is the selected tab -getWelcomePanel().setURL(url); -} - -/** - * DOCUMENT ME! - * - * @return welcome panel - */ -private WelcomePanel getWelcomePanel() { -return welcomePanel; -} /** * DOCUMENT ME! diff --git a/src/main/java/org/apache/log4j/chainsaw/WelcomePanel.java b/src/main/java/org/apache/log4j/chainsaw/components/welcome/WelcomePanel.java similarity index 95% rename from src/main/java/org/apache/log4j/chainsaw/WelcomePanel.java rename to src/main/java/org/apache/log4j/chainsaw/components/welcome/WelcomePanel.java index 73df5f1..dc98625 100644 --- a/src/main/java/org/apache/log4j/chainsaw/WelcomePanel.java +++ b/src/main/java/org/apache/log4j/chainsaw/components/welcome/WelcomePanel.java @@ -15,8 +15,10 @@ * limitations under the License. */ -package org.apache.log4j.chainsaw; +package org.apache.log4j.chainsaw.components.welcome; +import org.apache.log4j.chainsaw.ChainsawConstants; +import org.apache.log4j.chainsaw.JTextComponentFormatter; import org.apache.log4j.chainsaw.components.elements.SmallButton; import org.apache.log4j.chainsaw.icons.ChainsawIcons; import org.apache.logging.log4j.LogManager; @@ -82,7 +84,7 @@ public class WelcomePanel extends JPanel { } } -void setURL(final URL url) { +public void setURL(final URL url) { SwingUtilities.invokeLater( () -> { try {
(logging-chainsaw) branch master updated (0408edf -> 0c094ac)
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git from 0408edf reformats, cleanup, added loggers where they were missing new f203bc4 moved welcome panelt to its own package, removed unused methods new 0c094ac reformat, removed final from static The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: src/main/java/org/apache/log4j/chainsaw/LogUI.java | 21 + .../{ => components/welcome}/WelcomePanel.java | 6 -- .../apache/log4j/chainsaw/osx/OSXIntegration.java | 9 - 3 files changed, 9 insertions(+), 27 deletions(-) rename src/main/java/org/apache/log4j/chainsaw/{ => components/welcome}/WelcomePanel.java (95%)
(logging-chainsaw) 02/02: reformat, removed final from static
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit 0c094ac02efc847c518c5b920dfb542ee9814ee3 Author: Christian Grobmeier AuthorDate: Tue Nov 28 22:56:15 2023 +0100 reformat, removed final from static --- src/main/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java b/src/main/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java index 910aae7..a5def17 100644 --- a/src/main/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java +++ b/src/main/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java @@ -20,7 +20,6 @@ import org.apache.log4j.chainsaw.LogUI; import java.awt.Desktop; - /** * This class leverages the 'Desktop' awt API in order to follow Mac-specific UI guidelines. * @@ -32,20 +31,20 @@ public class OSXIntegration { public static final boolean IS_OSX = System.getProperty("os.name").startsWith("Mac OS X"); private static final Desktop desktop = Desktop.getDesktop(); -public static final void init(final LogUI logUI) { -if( desktop.isSupported(Desktop.Action.APP_ABOUT) ){ +public static void init(final LogUI logUI) { +if (desktop.isSupported(Desktop.Action.APP_ABOUT)) { desktop.setAboutHandler(e -> logUI.showAboutBox() ); } -if( desktop.isSupported(Desktop.Action.APP_PREFERENCES) ){ +if (desktop.isSupported(Desktop.Action.APP_PREFERENCES)) { desktop.setPreferencesHandler(e -> logUI.showApplicationPreferences() ); } -if( desktop.isSupported(Desktop.Action.APP_QUIT_HANDLER) ){ +if (desktop.isSupported(Desktop.Action.APP_QUIT_HANDLER)) { desktop.setQuitHandler((e, r) -> { if ( logUI.exit()) {
(logging-chainsaw) branch master updated: reformats, cleanup, added loggers where they were missing
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new 0408edf reformats, cleanup, added loggers where they were missing 0408edf is described below commit 0408edfae026272836237f59715f30d142de9019 Author: Christian Grobmeier AuthorDate: Tue Nov 28 22:42:18 2023 +0100 reformats, cleanup, added loggers where they were missing --- .../org/apache/log4j/chainsaw/ChainsawStarter.java | 12 +- .../log4j/chainsaw/prefs/SettingsManager.java | 142 +++-- 2 files changed, 79 insertions(+), 75 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java b/src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java index c7dc52a..0871d24 100644 --- a/src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java +++ b/src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java @@ -19,13 +19,11 @@ import java.security.Policy; import java.util.Locale; public class ChainsawStarter { -private static Logger logger = LogManager.getLogger(ChainsawStarter.class); +private static final Logger logger = LogManager.getLogger(ChainsawStarter.class); /** * Starts Chainsaw by attaching a new instance to the Log4J main root Logger * via a ChainsawAppender, and activates itself - * - * @param args */ public static void main(String[] args) { if (OSXIntegration.IS_OSX) { @@ -53,11 +51,15 @@ public class ChainsawStarter { if (lookAndFeelClassName != null && !(lookAndFeelClassName.trim().isEmpty())) { try{ UIManager.setLookAndFeel(lookAndFeelClassName); -}catch(Exception ex){} +} catch (Exception ex){ +logger.error(ex); +} }else{ try{ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); -}catch(Exception ex){} +} catch (Exception ex){ +logger.error(ex); +} } createChainsawGUI(settingsManager, null); }); diff --git a/src/main/java/org/apache/log4j/chainsaw/prefs/SettingsManager.java b/src/main/java/org/apache/log4j/chainsaw/prefs/SettingsManager.java index 421be92..b468efd 100644 --- a/src/main/java/org/apache/log4j/chainsaw/prefs/SettingsManager.java +++ b/src/main/java/org/apache/log4j/chainsaw/prefs/SettingsManager.java @@ -40,7 +40,6 @@ import java.util.HashMap; import java.util.Map; import java.util.ServiceLoader; - /** * SettingManager allows components to register interest in Saving/Loading * of general application preferences/settings. @@ -49,29 +48,28 @@ import java.util.ServiceLoader; * @author Scott Deboy sde...@apache.org */ public final class SettingsManager { -private static final Logger logger = LogManager.getLogger(); +private static final Logger logger = LogManager.getLogger(SettingsManager.class); private static final String GLOBAL_SETTINGS_FILE_NAME = "chainsaw.settings.properties"; -private class TabSettingsData{ +private static class TabSettingsData { FileBasedConfigurationBuilder file; AbstractConfiguration tabSettings; } -private PropertiesConfiguration m_configuration; -private FileBasedConfigurationBuilder m_builder; -private Map m_tabSettings; +private PropertiesConfiguration propertiesConfiguration; +private FileBasedConfigurationBuilder builder; +private Map tabSettings; -private final Map m_classToProperties = -new HashMap<>(); -private final Map m_classToName = new HashMap<>(); +private final Map classToProperties = new HashMap<>(); +private final Map classToName = new HashMap<>(); /** * Initialises the SettingsManager by loading the default Properties from * a resource */ public SettingsManager() { -m_tabSettings = new HashMap<>(); +tabSettings = new HashMap<>(); Parameters params = new Parameters(); File f = new File(getSettingsDirectory(), GLOBAL_SETTINGS_FILE_NAME); @@ -82,35 +80,36 @@ public final class SettingsManager { } FileBasedBuilderParameters fileParams = params.fileBased(); -if( f.exists() ){ +if (f.exists()) { fileParams.setFile(f); -}else{ +} else { URL defaultPrefs = this.getClass().getClassLoader() .getResource("org/apache/log4j/chainsaw/prefs/default.properties"); fileParams.setURL(defaultPrefs); } -m_builder = -new FileBasedConfigurationBuilder( +builder = +new FileBasedConfigurationBuilder<>( PropertiesConfiguration.class)
(logging-chainsaw) branch master updated: removed SettingsManager singleton in favor to injecting it
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new e60d736 removed SettingsManager singleton in favor to injecting it e60d736 is described below commit e60d736a8b3a15c31690f72b90efc1408eb55e69 Author: Christian Grobmeier AuthorDate: Tue Nov 28 22:36:54 2023 +0100 removed SettingsManager singleton in favor to injecting it --- .../chainsaw/ApplicationPreferenceModelPanel.java | 22 +++--- .../org/apache/log4j/chainsaw/ChainsawStarter.java | 19 +++--- .../log4j/chainsaw/ChainsawToolBarAndMenus.java| 28 +++- src/main/java/org/apache/log4j/chainsaw/LogUI.java | 79 ++ .../log4j/chainsaw/ReceiverConfigurationPanel.java | 18 ++--- .../log4j/chainsaw/TableColorizingRenderer.java| 6 +- .../apache/log4j/chainsaw/color/ColorPanel.java| 14 ++-- .../apache/log4j/chainsaw/color/RuleColorizer.java | 9 ++- .../chainsaw/components/logpanel/LogPanel.java | 42 ++-- .../logpanel/LogPanelPreferencePanel.java | 14 ++-- .../log4j/chainsaw/prefs/SettingsManager.java | 42 .../log4j/chainsaw/receivers/ReceiversPanel.java | 6 +- .../log4j/chainsaw/zeroconf/ZeroConfPlugin.java| 6 +- 13 files changed, 137 insertions(+), 168 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java b/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java index a5e61e6..d1dbd4d 100644 --- a/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java +++ b/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java @@ -19,7 +19,6 @@ package org.apache.log4j.chainsaw; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.log4j.chainsaw.helper.SwingHelper; import org.apache.log4j.chainsaw.osx.OSXIntegration; import javax.swing.*; @@ -27,9 +26,6 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeModel; import java.awt.*; -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; import java.util.Dictionary; import java.util.Enumeration; import java.util.Hashtable; @@ -51,23 +47,21 @@ public class ApplicationPreferenceModelPanel extends AbstractPreferencePanel { private JTextField cyclicBufferSize; private GeneralAllPrefPanel generalAllPrefPanel; private AbstractConfiguration m_globalConfiguration; +private SettingsManager settingsManager; -ApplicationPreferenceModelPanel() { -m_globalConfiguration = SettingsManager.getInstance().getGlobalConfiguration(); +ApplicationPreferenceModelPanel(SettingsManager settingsManager) { +this.m_globalConfiguration = settingsManager.getGlobalConfiguration(); +this.settingsManager = settingsManager; initComponents(); getOkButton().addActionListener( e -> { -SettingsManager.getInstance().saveGlobalSettings(); +settingsManager.saveGlobalSettings(); hidePanel(); }); getCancelButton().addActionListener(e -> hidePanel()); } -public void updateModel(){ - -} - /* (non-Javadoc) * @see org.apache.log4j.chainsaw.AbstractPreferencePanel#createTreeModel() */ @@ -128,7 +122,7 @@ public class ApplicationPreferenceModelPanel extends AbstractPreferencePanel { * */ private void setupListeners() { -final AbstractConfiguration config = SettingsManager.getInstance().getGlobalConfiguration(); +final AbstractConfiguration config = settingsManager.getGlobalConfiguration(); topPlacement.addActionListener( e -> config.setProperty("tabPlacement", SwingConstants.TOP)); @@ -221,7 +215,7 @@ public class ApplicationPreferenceModelPanel extends AbstractPreferencePanel { JPanel lfPanel = new JPanel(); lfPanel.setLayout(new BoxLayout(lfPanel, BoxLayout.Y_AXIS)); lfPanel.setBorder(BorderFactory.createTitledBorder(" Look & Feel ")); -final AbstractConfiguration configuration = SettingsManager.getInstance().getGlobalConfiguration(); +final AbstractConfiguration configuration = settingsManager.getGlobalConfiguration(); for (final UIManager.LookAndFeelInfo lfInfo : lookAndFeels) { final JRadioButton lfItem = new JRadioButton(" " + lfInfo.getName() + " "); @@ -272,7 +266,7 @@ public class ApplicationPreferenceModelPanel extends AbstractPreferencePanel { } public void updateModel(){ -AbstractConfiguration config = SettingsManager.getInstance().getGlobalConfiguration(); +
(logging-log4j2) branch main-sync-log4j-to-slf4j updated (37157b7352 -> 3e728a2f4c)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git omit 37157b7352 Port `log4j-to-slf4j` changes from `2.x` omit a161c54458 Improve auxiliary support files omit 8a82c74e92 Rename `.yml` to `.yaml`, the official extension omit 1a872d499c Revamp README omit 0ae19a98e7 Rename `log4j-perf` to `log4j-perf-test` omit 09cb59ea72 Remove unused `benchmark.yml` workflow omit bfc65f240c Rename `log4j-osgi` to `log4j-osgi-test` omit 4f1bcdc8b1 Sync `pom.xml`s with the ones in `2.x` omit 7032d68b28 Remove deprecated `log4j-distribution` et al. add cf2ccc5149 Use String#isEmpty() add 1be544d128 Remove deprecated `log4j-distribution` et al. add aa581bd862 Sync `pom.xml`s with the ones in `2.x` add cc7797d4f8 Rename `log4j-osgi` to `log4j-osgi-test` add c56514a0f6 Remove unused `benchmark.yml` workflow add af6cc67e65 Rename `log4j-perf` to `log4j-perf-test` add 8fa369a6df Revamp README add ec75825f57 Rename `.yml` to `.yaml`, the official extension add 9651905cbe Improve auxiliary support files add 3e728a2f4c Port `log4j-to-slf4j` changes from `2.x` This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (37157b7352) \ N -- N -- N refs/heads/main-sync-log4j-to-slf4j (3e728a2f4c) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../src/main/java/org/apache/log4j/PropertyConfigurator.java | 4 ++-- .../main/java/org/apache/log4j/config/PropertiesConfiguration.java| 4 ++-- .../src/main/java/org/apache/log4j/xml/XmlConfiguration.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
(logging-log4j2) 07/08: Rename `.yml` to `.yaml`, the official extension
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit ec75825f57e5682625b26a5b22a83d29d81c3b35 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 22:07:22 2023 +0100 Rename `.yml` to `.yaml`, the official extension --- .github/{dependabot.yml => dependabot.yaml} | 0 .github/workflows/{build.yml => build.yaml} | 0 .github/workflows/{codeql-analysis.yml => codeql-analysis.yaml} | 0 .../java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java | 2 +- .../logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java | 2 +- .../core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java | 2 +- ...PatternConverterTest.yml => SequenceNumberPatternConverterTest.yaml} | 0 ...PaddedTest.yml => SequenceNumberPatternConverterZeroPaddedTest.yaml} | 0 .../src/test/resources/{log4j2-2134.yml => log4j2-2134.yaml}| 0 9 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yaml similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yaml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build.yaml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yaml similarity index 100% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/codeql-analysis.yaml diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java index f7a8086b96..641326d564 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; @Tag("yaml") -@LoggerContextSource("log4j2-2134.yml") +@LoggerContextSource("log4j2-2134.yaml") public class JiraLog4j2_2134Test { @Test diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java index 69e3b315b4..60ff42bc98 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java @@ -27,7 +27,7 @@ import org.apache.logging.log4j.core.test.junit.LoggerContextSource; import org.apache.logging.log4j.core.test.junit.Named; import org.junit.jupiter.api.Test; -@LoggerContextSource("SequenceNumberPatternConverterTest.yml") +@LoggerContextSource("SequenceNumberPatternConverterTest.yaml") public class SequenceNumberPatternConverterTest { @Test diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java index feb2a2b4d8..049fe51c72 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java @@ -27,7 +27,7 @@ import org.apache.logging.log4j.core.test.junit.LoggerContextSource; import org.apache.logging.log4j.core.test.junit.Named; import org.junit.jupiter.api.Test; -@LoggerContextSource("SequenceNumberPatternConverterZeroPaddedTest.yml") +@LoggerContextSource("SequenceNumberPatternConverterZeroPaddedTest.yaml") public class SequenceNumberPatternConverterZeroPaddedTest { @Test diff --git a/log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yml b/log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yaml similarity index 100% rename from log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yml rename to log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yaml diff --git a/log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yml b/log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yaml similarity index 100% rename from log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yml rename to log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yaml diff --git a/log4j-core-test/src/test/resources/log4j2-2134.yml
(logging-log4j2) 02/08: Sync `pom.xml`s with the ones in `2.x`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit aa581bd862180fb5a2790162f7ac602f3fb6d149 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:46:01 2023 +0100 Sync `pom.xml`s with the ones in `2.x` --- log4j-1.2-api/pom.xml| 2 - log4j-appserver/pom.xml | 2 - log4j-core-its/pom.xml | 2 - log4j-csv/pom.xml| 2 - log4j-distribution/pom.xml | 576 --- log4j-docker/pom.xml | 2 - log4j-flume-ng/pom.xml | 2 - log4j-gctests/pom.xml| 2 - log4j-iostreams/pom.xml | 2 - log4j-jcl/pom.xml| 2 - log4j-jdbc-dbcp2/pom.xml | 2 - log4j-jdbc/pom.xml | 2 - log4j-jndi-test/pom.xml | 2 - log4j-jndi/pom.xml | 2 - log4j-kubernetes/pom.xml | 2 - log4j-layout-jackson-xml/pom.xml | 2 - log4j-layout-jackson/pom.xml | 2 - log4j-layout-template-json-test/pom.xml | 2 - log4j-layout-template-json/pom.xml | 2 - log4j-mongodb4/pom.xml | 2 - log4j-osgi/pom.xml | 2 - log4j-plugin-processor/pom.xml | 2 - log4j-plugins-test/pom.xml | 2 - log4j-plugins/pom.xml| 2 - log4j-slf4j-impl/pom.xml | 2 - log4j-slf4j2-impl/pom.xml| 2 - log4j-spring-cloud-config-client/pom.xml | 2 - log4j-to-jul/pom.xml | 2 - log4j-to-slf4j/pom.xml | 2 - pom.xml | 53 ++- 30 files changed, 49 insertions(+), 636 deletions(-) diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml index 15ec761ae2..95ff919fd6 100644 --- a/log4j-1.2-api/pom.xml +++ b/log4j-1.2-api/pom.xml @@ -30,8 +30,6 @@ The Apache Log4j 1.x Compatibility API ${basedir}/.. -Log4j 1.2 Documentation -/log4j12-api -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> - 4.0.0 - -org.apache.logging.log4j -log4j -${revision} -../log4j-parent - - - log4j-distribution - pom - Log4j Distribution - The Apache Log4j distribution archives. - -true -true -true -true -4.5.13 -4.4.12 -1.7.36 -1.1.10.5 -3.1.7 - - - - - -org.slf4j -slf4j-api -${slf4j.version} - - -org.apache.httpcomponents -httpcore -${httpcore.version} - - -org.apache.httpcomponents -httpclient -${httpclient.version} - - -org.xerial.snappy -snappy-java -${snappy.version} - - - - - - - org.apache.logging.log4j - log4j-1.2-api - ${project.version} - - - org.apache.logging.log4j - log4j-1.2-api - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-api - ${project.version} - - - org.apache.logging.log4j - log4j-api - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-appserver - ${project.version} - - - org.apache.logging.log4j - log4j-appserver - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-core - ${project.version} - - - org.apache.logging.log4j - log4j-core - ${project.version} - sources - - - org.apache.logging.log4j - log4j-core-test - ${project.version} - - - org.apache.logging.log4j - log4j-core-test - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-csv - ${project.version} - - - org.apache.logging.log4j - log4j-csv - ${project.version} - sources - - - org.apache.logging.log4j - log4j-docker - ${project.version} - - - org.apache.logging.log4j - log4j-docker - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-flume-ng - ${project.version} - - - org.apache.httpcomponents - httpcore - - - - - org.apache.logging.log4j - log4j-flume-ng - ${project.version} - sources - - - org.apache.httpcomponents - httpcore - - - - - - org.apache.logging.log4j - log4j-iostreams - ${project.version} - - -
(logging-log4j2) 04/08: Remove unused `benchmark.yml` workflow
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit c56514a0f65ce5b4b5e2ff296c6dcfcab3569163 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:51:49 2023 +0100 Remove unused `benchmark.yml` workflow --- .github/workflows/benchmark.yml | 236 1 file changed, 236 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 40dc664e77..00 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,236 +0,0 @@ -# -# 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. -# - -name: benchmark - -on: [ workflow_dispatch ] - -jobs: - - build: - -if: github.repository == 'apache/logging-log4j2' - -runs-on: ubuntu-latest - -steps: - - - name: Checkout repository -uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 - - - name: Set up JDK 11 -uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # 3.13.0 -with: - distribution: temurin - java-version: 11 - java-package: jdk - architecture: x64 - cache: maven - - - name: Build with Maven -shell: bash -run: | - ./mvnw \ ---show-version --batch-mode --errors --no-transfer-progress \ --DskipTests=true \ ---projects log4j-perf \ ---also-make \ -package - - - name: Upload built sources -uses: actions/upload-artifact@v3 -with: - name: benchmarks.jar - path: log4j-perf/target/benchmarks.jar - - run: - -needs: build - -runs-on: ${{ matrix.os }} - -strategy: - matrix: -os: [ macos-latest, ubuntu-latest, windows-latest ] -jdk: [ 11, 17 ] -concurrency: [ 1, 8 ] -jmhCommand: - - "-t $CONCURRENCY -f 3 -wi 3 -w 10s -i 4 -r 20s -prof gc -prof perfnorm -rf json -rff results-layout-jtl.json '.*JsonTemplateLayoutBenchmark.*Jtl4EcsLayout'" - - "-t $CONCURRENCY -f 3 -wi 3 -w 10s -i 4 -r 20s -prof gc -prof perfnorm -rf json -rff results-util-instant-format.json '.*InstantFormatBenchmark.*'" - -steps: - - - name: Checkout repository -uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 - - - name: Download built sources -uses: actions/download-artifact@v3 -with: - name: benchmarks.jar - path: log4j-perf/target - - - name: Set up JDK ${{ matrix.jdk }} -if: matrix.jdk != 11 -uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # 3.13.0 -with: - distribution: temurin - java-version: ${{ matrix.jdk }} - java-package: jdk - architecture: x64 - cache: maven - - - name: Run benchmarks -timeout-minutes: 120 -shell: bash -run: | - export CONCURRENCY=${{ matrix.concurrency }} - java \ --jar log4j-perf/target/benchmarks.jar \ -${{ matrix.jmhCommand }} - - - name: Stage benchmark results for commit -shell: bash -run: | - - # Determine the artifact version. - set -x - ./mvnw \ ---batch-mode --quiet \ --DforceStdout=true \ --Dexpression=project.version \ -help:evaluate \ -| tee mvnw-project-version.out - echo - - # Determine certain file path properties. - export REVISION=$(&1 | tee git-push.out -if [ $? -eq 0 ]; then - exit 0 -else - set -e - let RETRY+=1 - echo "retry #$RETRY" - git pull -r origin gh-pages -fi - done - - index: - -runs-on: ubuntu-latest -needs: run - -steps: - - - name: Checkout repository -uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 -with: - ref: gh-pages - - - name: Setup Python 3 -uses:
(logging-log4j2) 03/08: Rename `log4j-osgi` to `log4j-osgi-test`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit cc7797d4f84f4e41cc824eab0ba0fca42a48ac03 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:48:12 2023 +0100 Rename `log4j-osgi` to `log4j-osgi-test` --- {log4j-osgi => log4j-osgi-test}/pom.xml | 2 +- .../org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java| 0 .../test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java | 0 .../apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java | 0 .../java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java | 0 .../logging/log4j/osgi/tests/equinox/EquinoxLoadApiBundleTest.java| 0 .../apache/logging/log4j/osgi/tests/felix/FelixLoadApiBundleTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/junit/OsgiTestRule.java | 0 {log4j-osgi => log4j-osgi-test}/src/test/resources/log4j2.custom | 0 pom.xml | 2 +- src/site/asciidoc/runtime-dependencies.adoc | 4 14 files changed, 2 insertions(+), 6 deletions(-) diff --git a/log4j-osgi/pom.xml b/log4j-osgi-test/pom.xml similarity index 99% rename from log4j-osgi/pom.xml rename to log4j-osgi-test/pom.xml index fb2472fbdb..34bb227181 100644 --- a/log4j-osgi/pom.xml +++ b/log4j-osgi-test/pom.xml @@ -24,7 +24,7 @@ ../log4j-parent - log4j-osgi + log4j-osgi-test jar Apache Log4j OSGi The Apache Log4j OSGi tests diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/equinox/EquinoxLoadApiBundleTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/equinox/EquinoxLoadApiBundleTest.java similarity index 100% rename from
(logging-log4j2) 08/08: Improve auxiliary support files
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 9651905cbefbc2a92c6b98ff41bc60e4959b1aff Author: Volkan Yazıcı AuthorDate: Tue Nov 28 11:57:34 2023 +0100 Improve auxiliary support files --- BUILDING.md| 1 - CODE_OF_CONDUCT.md | 2 +- NOTICE.txt | 3 -- RELEASE-NOTES.adoc | 98 -- CODE_OF_CONDUCT.md => RELEASE-NOTES.md | 3 +- SECURITY.md| 25 + 6 files changed, 18 insertions(+), 114 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index b7e8ead10f..1223bda341 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -18,7 +18,6 @@ # Requirements * JDK 11+ -* Apache Maven 3.x (optional) * A modern Linux, OSX, or Windows host diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 3ed501501d..e13878a151 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. --> -The Apache code of conduct page is [https://www.apache.org/foundation/policies/conduct.html](https://www.apache.org/foundation/policies/conduct.html). +See [the Apache Software Foundation's Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). diff --git a/NOTICE.txt b/NOTICE.txt index bdf985e45c..e51fe310c8 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -4,9 +4,6 @@ Copyright 1999-2023 Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). -ResolverUtil.java -Copyright 2005-2006 Tim Fennell - TypeUtil.java Copyright 2002-2012 Ramnivas Laddad, Juergen Hoeller, Chris Beams diff --git a/RELEASE-NOTES.adoc b/RELEASE-NOTES.adoc deleted file mode 100644 index 0166af7e81..00 --- a/RELEASE-NOTES.adoc +++ /dev/null @@ -1,98 +0,0 @@ - -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 - - https://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. - - -= 3.0.0 (2023-06-17) - -As the Java ecosystem has evolved, requests have been received from users, and the need for improved security has -become more apparent, changes were necessariy in Log4j's design: - -* With the introduction of the Java Platform Module System (JPMS) changes were needed to how the various log4j modules -are packaged. While not every log4j module is now a fully compliant JPMS module with its own module-info.java file, -all the modules likely to be used in a JPMS environment are. -* Many optional components, such as Scripting, JNDI, JPA and JMS, have been moved to their own modules. This makes -Log4j-core slightly smaller in 3.x and aids in security by not having jars with unwanted behaviors present, making -disabling them via system properties unnecessary. -* All plugins constructed using Log4j 3.x are now located using Java's ServiceLoader. This avoids many of the problems -users had packaging plugins in "shaded" jars as that technology directly supports ServiceLoader. Plugins constructed -using Log4j 2.x will still function in Log4j 3.x. -* Log4j's annotation processor has been individually packaged separate from Log4j-core and the plugin system it enables. -For applications using the module path this makes it easier to provide the annotation processor since it must be -explicitly declared in those cases. -* Log4j 3.x now uses an internal dependency injection framework to allow plugins to be injected with instances of -classes they are dependent on. -* Many system properties used by Log4j can now be set to apply to a single LoggerContext making configuration -in application frameworks that support multiple applications more flexible. -* Some deprecated classes have been removed. However, every attempt has been made to ensure that user code compiled -for Log4j 2.x will continue to operate with the Log4j 3.x libraries present instead. - -== Changes - -=== Added - -* Allow plugins to be created through more flexible dependency injection patterns. (for https://issues.apache.org/jira/browse/LOG4J2-1188[LOG4J2-1188] by Matt Sicker) -* Allow to force LOG4J2 to use TCCL
(logging-log4j2) 05/08: Rename `log4j-perf` to `log4j-perf-test`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit af6cc67e655beda0072c3db5315c67c01ed12462 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:53:01 2023 +0100 Rename `log4j-perf` to `log4j-perf-test` --- .../log4j/core/time/internal/format/FixedDateFormat.java | 4 ++-- {log4j-perf => log4j-perf-test}/pom.xml| 2 +- .../org/apache/logging/log4j/ThreadContextBenchmarkAccess.java | 0 .../layout/template/json/BlackHoleByteBufferDestination.java | 0 .../layout/template/json/JsonTemplateLayoutBenchmark.java | 0 .../template/json/JsonTemplateLayoutBenchmarkReport.java | 0 .../layout/template/json/JsonTemplateLayoutBenchmarkState.java | 0 .../logging/log4j/message/ParameterFormatterBenchmark.java | 0 .../perf/jmh/AbstractStringLayoutStringEncodingBenchmark.java | 0 .../logging/log4j/perf/jmh/AnnotationVsMarkerInterface.java| 0 .../logging/log4j/perf/jmh/AsyncAppenderLog4j1Benchmark.java | 0 .../log4j/perf/jmh/AsyncAppenderLog4j1LocationBenchmark.java | 0 .../logging/log4j/perf/jmh/AsyncAppenderLog4j2Benchmark.java | 0 .../log4j/perf/jmh/AsyncAppenderLog4j2LocationBenchmark.java | 0 .../logging/log4j/perf/jmh/AsyncAppenderLogbackBenchmark.java | 0 .../log4j/perf/jmh/AsyncAppenderLogbackLocationBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/AsyncLoggersBenchmark.java | 0 .../logging/log4j/perf/jmh/AsyncLoggersLocationBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/ClocksBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/CollectionsBenchmark.java| 0 .../log4j/perf/jmh/ConcurrentAsyncLoggerToFileBenchmark.java | 0 .../log4j/perf/jmh/ConfiguratorInitializeBenchmark.java| 0 .../apache/logging/log4j/perf/jmh/DateTimeFormatBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/DebugDisabledBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/FileAppenderBenchmark.java | 0 .../logging/log4j/perf/jmh/FileAppenderParamsBenchmark.java| 0 .../logging/log4j/perf/jmh/FileAppenderThrowableBenchmark.java | 0 .../log4j/perf/jmh/FileAppenderWithLocationBenchmark.java | 0 .../logging/log4j/perf/jmh/FormatterLoggerBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/JdbcAppenderBenchmark.java | 0 .../log4j/perf/jmh/Log4j2AppenderComparisonBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/Log4jLogEventBenchmark.java | 0 .../log4j/perf/jmh/LogBuilderMarkerFilterBenchmark.java| 0 .../apache/logging/log4j/perf/jmh/LoggerConfigBenchmark.java | 0 .../logging/log4j/perf/jmh/LoggingDisabledBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/MDCFilterBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/MarkerFilterBenchmark.java | 0 .../logging/log4j/perf/jmh/MemoryHandlerJULBenchmark.java | 0 .../log4j/perf/jmh/MemoryHandlerJULLocationBenchmark.java | 0 .../logging/log4j/perf/jmh/NamePatternConverterBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/NanotimeBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/OutputBenchmark.java | 0 .../logging/log4j/perf/jmh/ParameterizedMessageBenchmark.java | 0 .../log4j/perf/jmh/ParameterizedMessageInliningBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/PatternLayoutBenchmark.java | 0 .../log4j/perf/jmh/PatternLayoutComparisonBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/ReflectionBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/SimpleBenchmark.java | 0 .../logging/log4j/perf/jmh/SortedArrayVsHashMapBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/StackWalkBenchmark.java | 0 .../logging/log4j/perf/jmh/StringBuilderEscapeBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/StringEncodingBenchmark.java | 0 .../logging/log4j/perf/jmh/TextEncoderHelperBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/ThreadContextBenchmark.java | 0 .../perf/jmh/ThreadLocalVsConcurrentHashMapBenchmark.java | 0 .../logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java | 0 .../logging/log4j/perf/jmh/ThreadsafeDateFormatBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/TimeFormatBenchmark.java | 0 .../java/org/apache/logging/log4j/perf/jmh/UnboxBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/UuidGeneratorBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java| 0 .../java/org/apache/logging/log4j/perf/jmh/package-info.java | 0 .../org/apache/logging/log4j/perf/nogc/AbstractLogger.java | 0 .../java/org/apache/logging/log4j/perf/nogc/ClassicLogger.java | 0 .../java/org/apache/logging/log4j/perf/nogc/DemoAppender.java | 0 .../java/org/apache/logging/log4j/perf/nogc/NoGcLayout.java| 0 .../java/org/apache/logging/log4j/perf/nogc/NoGcLogger.java| 0
(logging-log4j2) branch main updated (cf2ccc5149 -> 9651905cbe)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from cf2ccc5149 Use String#isEmpty() new 1be544d128 Remove deprecated `log4j-distribution` et al. new aa581bd862 Sync `pom.xml`s with the ones in `2.x` new cc7797d4f8 Rename `log4j-osgi` to `log4j-osgi-test` new c56514a0f6 Remove unused `benchmark.yml` workflow new af6cc67e65 Rename `log4j-perf` to `log4j-perf-test` new 8fa369a6df Revamp README new ec75825f57 Rename `.yml` to `.yaml`, the official extension new 9651905cbe Improve auxiliary support files The 8 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .github/{dependabot.yml => dependabot.yaml}| 0 .github/workflows/benchmark.yml| 236 - .github/workflows/{build.yml => build.yaml}| 0 .../{codeql-analysis.yml => codeql-analysis.yaml} | 0 BUILDING.md| 1 - CODE_OF_CONDUCT.md | 2 +- NOTICE.txt | 3 - README.adoc| 23 + README.md | 117 - RELEASE-NOTES.adoc | 98 CODE_OF_CONDUCT.md => RELEASE-NOTES.md | 3 +- SECURITY.md| 25 +- log4j-1.2-api/pom.xml | 2 - log4j-appserver/pom.xml| 2 - log4j-core-its/pom.xml | 2 - .../log4j/core/config/JiraLog4j2_2134Test.java | 2 +- .../SequenceNumberPatternConverterTest.java| 2 +- ...quenceNumberPatternConverterZeroPaddedTest.java | 2 +- ...yml => SequenceNumberPatternConverterTest.yaml} | 0 ...uenceNumberPatternConverterZeroPaddedTest.yaml} | 0 .../{log4j2-2134.yml => log4j2-2134.yaml} | 0 .../core/time/internal/format/FixedDateFormat.java | 4 +- log4j-csv/pom.xml | 2 - log4j-distribution/pom.xml | 576 - log4j-distribution/src/assembly/bin.xml| 56 -- log4j-distribution/src/assembly/src.xml| 80 --- log4j-docker/pom.xml | 2 - log4j-flume-ng/pom.xml | 2 - log4j-gctests/pom.xml | 2 - log4j-iostreams/pom.xml| 2 - log4j-jcl/pom.xml | 2 - log4j-jdbc-dbcp2/pom.xml | 2 - log4j-jdbc/pom.xml | 2 - log4j-jndi-test/pom.xml| 2 - log4j-jndi/pom.xml | 2 - log4j-kubernetes/pom.xml | 2 - log4j-layout-jackson-xml/pom.xml | 2 - log4j-layout-jackson/pom.xml | 2 - log4j-layout-template-json-test/pom.xml| 2 - log4j-layout-template-json/pom.xml | 2 - log4j-mongodb4/pom.xml | 2 - {log4j-osgi => log4j-osgi-test}/pom.xml| 4 +- .../log4j/osgi/tests/AbstractLoadBundleTest.java | 0 .../logging/log4j/osgi/tests/AbstractOsgiTest.java | 0 .../logging/log4j/osgi/tests/CoreOsgiTest.java | 0 .../log4j/osgi/tests/CustomConfiguration.java | 0 .../osgi/tests/CustomConfigurationFactory.java | 0 .../logging/log4j/osgi/tests/JULProviderTest.java | 0 .../log4j/osgi/tests/SLF4JProviderTest.java| 0 .../tests/equinox/EquinoxLoadApiBundleTest.java| 0 .../osgi/tests/felix/FelixLoadApiBundleTest.java | 0 .../log4j/osgi/tests/junit/OsgiTestRule.java | 0 .../src/test/resources/log4j2.custom | 0 {log4j-perf => log4j-perf-test}/pom.xml| 2 +- .../log4j/ThreadContextBenchmarkAccess.java| 0 .../json/BlackHoleByteBufferDestination.java | 0 .../template/json/JsonTemplateLayoutBenchmark.java | 0 .../json/JsonTemplateLayoutBenchmarkReport.java| 0 .../json/JsonTemplateLayoutBenchmarkState.java | 0 .../log4j/message/ParameterFormatterBenchmark.java | 0 ...bstractStringLayoutStringEncodingBenchmark.java | 0 .../perf/jmh/AnnotationVsMarkerInterface.java | 0 .../perf/jmh/AsyncAppenderLog4j1Benchmark.java | 0 .../jmh/AsyncAppenderLog4j1LocationBenchmark.java | 0 .../perf/jmh/AsyncAppenderLog4j2Benchmark.java | 0 .../jmh/AsyncAppenderLog4j2LocationBenchmark.java | 0 .../perf/jmh/AsyncAppenderLogbackBenchmark.java| 0 .../jmh/AsyncAppenderLogbackLocationBenchmark.java | 0
(logging-log4j2) 06/08: Revamp README
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 8fa369a6df76ea1bb8fe5d30148a7ee320908591 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 22:04:50 2023 +0100 Revamp README --- README.adoc | 23 README.md | 117 2 files changed, 23 insertions(+), 117 deletions(-) diff --git a/README.adoc b/README.adoc new file mode 100644 index 00..8c85d68c66 --- /dev/null +++ b/README.adoc @@ -0,0 +1,23 @@ + +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. + + +https://github.com/apache/logging-log4j2/actions/workflows/build.yaml[image:https://img.shields.io/github/actions/workflow/status/apache/logging-log4j2/build.yaml?branch=main=build%20%283.x%29[Build (3.x)]] +https://search.maven.org/artifact/org.apache.logging.log4j/log4j-api[image:https://img.shields.io/maven-central/v/org.apache.logging.log4j/log4j-api?versionPrefix=3.[Maven Central (3.x)]] +https://github.com/apache/logging-log4j2/security/code-scanning[image:https://github.com/apache/logging-log4j2/actions/workflows/codeql-analysis.yaml/badge.svg?branch=main[CodeQL (3.x)]] + +Apache Log4j is a versatile, industrial-grade Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. +For further information (support, download, etc.) see https://logging.apache.org/log4j[the project website]. diff --git a/README.md b/README.md deleted file mode 100644 index 83534e3430..00 --- a/README.md +++ /dev/null @@ -1,117 +0,0 @@ - - -# [Apache Log4j 3.x](https://logging.apache.org/log4j/2.x/) - -Apache Log4j 3.x is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, -and provides many of the improvements available in Logback while fixing some inherent problems in Logback's architecture. - -[![Maven Central](https://img.shields.io/maven-central/v/org.apache.logging.log4j/log4j-api.svg)](https://search.maven.org/artifact/org.apache.logging.log4j/log4j-api) -[![build (2.x)](https://img.shields.io/github/actions/workflow/status/apache/logging-log4j2/build.yml?branch=release-2.x=build%20%282.x%29)](https://github.com/apache/logging-log4j2/actions/workflows/build.yml) -[![build (3.x)](https://img.shields.io/github/actions/workflow/status/apache/logging-log4j2/build.yml?branch=master=build%20%283.x%29)](https://github.com/apache/logging-log4j2/actions/workflows/build.yml) -![CodeQL](https://github.com/apache/logging-log4j2/actions/workflows/codeql-analysis.yml/badge.svg) - -## Pull Requests on Github - -By sending a pull request you grant the Apache Software Foundation sufficient rights to use and release the submitted -work under the Apache license. You grant the same rights (copyright license, patent license, etc.) to the -Apache Software Foundation as if you have signed a Contributor License Agreement. For contributions that are -judged to be non-trivial, you will be asked to actually sign a [Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). - -## Usage - -Users should refer to [Maven, Ivy, Gradle, and SBT Artifacts](http://logging.apache.org/log4j/2.x/maven-artifacts.html) -on the Log4j web site for instructions on how to include Log4j into their project using their chosen build tool. - -Basic usage of the `Logger` API: - -```java -package com.example; - -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; - -public class Example { -private static final Logger LOGGER = LogManager.getLogger(); - -public static void main(String... args) { -String thing = args.length > 0 ? args[0] : "world"; -LOGGER.info("Hello, {}!", thing); -LOGGER.debug("Got calculated value only if debug enabled: {}", () -> doSomeCalculation()); -} - -private static Object doSomeCalculation() { -// do some complicated calculation -} -} -``` - -And an example `log4j2.xml` configuration file: - -```xml - - - - - - - - - - - - - - -``` - -## Documentation
(logging-log4j2) 01/08: Remove deprecated `log4j-distribution` et al.
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 1be544d128ea5df25c180e08f28b6390cd185e77 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:39:46 2023 +0100 Remove deprecated `log4j-distribution` et al. --- log4j-distribution/src/assembly/bin.xml | 56 --- log4j-distribution/src/assembly/src.xml | 80 - src/assembly/site.xml | 31 - 3 files changed, 167 deletions(-) diff --git a/log4j-distribution/src/assembly/bin.xml b/log4j-distribution/src/assembly/bin.xml deleted file mode 100644 index 2c691abed4..00 --- a/log4j-distribution/src/assembly/bin.xml +++ /dev/null @@ -1,56 +0,0 @@ - - -bin - -tar.gz -zip - -apache-log4j-${project.version}-bin -false - - -true - - - - - -org.apache.logging.log4j:log4j-* - - -false - - - - - -.. - -LICENSE.txt -NOTICE.txt - - - - - -../RELEASE-NOTES.adoc -. -RELEASE-NOTES.adoc - - - diff --git a/log4j-distribution/src/assembly/src.xml b/log4j-distribution/src/assembly/src.xml deleted file mode 100644 index 058ed56820..00 --- a/log4j-distribution/src/assembly/src.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - src - -zip -tar.gz - - apache-log4j-${project.version}-src - - - - .. - / - true - -**/flume-og/** - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*] - - - - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?Vagrantfile(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?Dockerfile(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?] - - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser] - - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties] - - - - - diff --git a/src/assembly/site.xml b/src/assembly/site.xml deleted file mode 100644 index 88292eb292..00 --- a/src/assembly/site.xml +++ /dev/null @@ -1,31 +0,0 @@ - - -http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0; - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd;> - site - -zip - - - - ${stagingSiteURL} - ${stagingSiteURL} - - -
(logging-log4j2) branch main-sync-log4j-to-slf4j created (now 37157b7352)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git at 37157b7352 Port `log4j-to-slf4j` changes from `2.x` This branch includes the following new commits: new 7032d68b28 Remove deprecated `log4j-distribution` et al. new 4f1bcdc8b1 Sync `pom.xml`s with the ones in `2.x` new bfc65f240c Rename `log4j-osgi` to `log4j-osgi-test` new 09cb59ea72 Remove unused `benchmark.yml` workflow new 0ae19a98e7 Rename `log4j-perf` to `log4j-perf-test` new 1a872d499c Revamp README new 8a82c74e92 Rename `.yml` to `.yaml`, the official extension new a161c54458 Improve auxiliary support files new 37157b7352 Port `log4j-to-slf4j` changes from `2.x` The 9 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j2) 08/09: Improve auxiliary support files
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit a161c54458a2436c1bc6e3239ad18d5d5acd2535 Author: Volkan Yazıcı AuthorDate: Tue Nov 28 11:57:34 2023 +0100 Improve auxiliary support files --- BUILDING.md| 1 - CODE_OF_CONDUCT.md | 2 +- NOTICE.txt | 3 -- RELEASE-NOTES.adoc | 98 -- CODE_OF_CONDUCT.md => RELEASE-NOTES.md | 3 +- SECURITY.md| 25 + 6 files changed, 18 insertions(+), 114 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index b7e8ead10f..1223bda341 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -18,7 +18,6 @@ # Requirements * JDK 11+ -* Apache Maven 3.x (optional) * A modern Linux, OSX, or Windows host diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 3ed501501d..e13878a151 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. --> -The Apache code of conduct page is [https://www.apache.org/foundation/policies/conduct.html](https://www.apache.org/foundation/policies/conduct.html). +See [the Apache Software Foundation's Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). diff --git a/NOTICE.txt b/NOTICE.txt index bdf985e45c..e51fe310c8 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -4,9 +4,6 @@ Copyright 1999-2023 Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). -ResolverUtil.java -Copyright 2005-2006 Tim Fennell - TypeUtil.java Copyright 2002-2012 Ramnivas Laddad, Juergen Hoeller, Chris Beams diff --git a/RELEASE-NOTES.adoc b/RELEASE-NOTES.adoc deleted file mode 100644 index 0166af7e81..00 --- a/RELEASE-NOTES.adoc +++ /dev/null @@ -1,98 +0,0 @@ - -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 - - https://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. - - -= 3.0.0 (2023-06-17) - -As the Java ecosystem has evolved, requests have been received from users, and the need for improved security has -become more apparent, changes were necessariy in Log4j's design: - -* With the introduction of the Java Platform Module System (JPMS) changes were needed to how the various log4j modules -are packaged. While not every log4j module is now a fully compliant JPMS module with its own module-info.java file, -all the modules likely to be used in a JPMS environment are. -* Many optional components, such as Scripting, JNDI, JPA and JMS, have been moved to their own modules. This makes -Log4j-core slightly smaller in 3.x and aids in security by not having jars with unwanted behaviors present, making -disabling them via system properties unnecessary. -* All plugins constructed using Log4j 3.x are now located using Java's ServiceLoader. This avoids many of the problems -users had packaging plugins in "shaded" jars as that technology directly supports ServiceLoader. Plugins constructed -using Log4j 2.x will still function in Log4j 3.x. -* Log4j's annotation processor has been individually packaged separate from Log4j-core and the plugin system it enables. -For applications using the module path this makes it easier to provide the annotation processor since it must be -explicitly declared in those cases. -* Log4j 3.x now uses an internal dependency injection framework to allow plugins to be injected with instances of -classes they are dependent on. -* Many system properties used by Log4j can now be set to apply to a single LoggerContext making configuration -in application frameworks that support multiple applications more flexible. -* Some deprecated classes have been removed. However, every attempt has been made to ensure that user code compiled -for Log4j 2.x will continue to operate with the Log4j 3.x libraries present instead. - -== Changes - -=== Added - -* Allow plugins to be created through more flexible dependency injection patterns. (for https://issues.apache.org/jira/browse/LOG4J2-1188[LOG4J2-1188] by Matt Sicker) -* Allow to force
(logging-log4j2) 05/09: Rename `log4j-perf` to `log4j-perf-test`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 0ae19a98e754eb97b00d2a902ee86d35cbbdd4a0 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:53:01 2023 +0100 Rename `log4j-perf` to `log4j-perf-test` --- .../log4j/core/time/internal/format/FixedDateFormat.java | 4 ++-- {log4j-perf => log4j-perf-test}/pom.xml| 2 +- .../org/apache/logging/log4j/ThreadContextBenchmarkAccess.java | 0 .../layout/template/json/BlackHoleByteBufferDestination.java | 0 .../layout/template/json/JsonTemplateLayoutBenchmark.java | 0 .../template/json/JsonTemplateLayoutBenchmarkReport.java | 0 .../layout/template/json/JsonTemplateLayoutBenchmarkState.java | 0 .../logging/log4j/message/ParameterFormatterBenchmark.java | 0 .../perf/jmh/AbstractStringLayoutStringEncodingBenchmark.java | 0 .../logging/log4j/perf/jmh/AnnotationVsMarkerInterface.java| 0 .../logging/log4j/perf/jmh/AsyncAppenderLog4j1Benchmark.java | 0 .../log4j/perf/jmh/AsyncAppenderLog4j1LocationBenchmark.java | 0 .../logging/log4j/perf/jmh/AsyncAppenderLog4j2Benchmark.java | 0 .../log4j/perf/jmh/AsyncAppenderLog4j2LocationBenchmark.java | 0 .../logging/log4j/perf/jmh/AsyncAppenderLogbackBenchmark.java | 0 .../log4j/perf/jmh/AsyncAppenderLogbackLocationBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/AsyncLoggersBenchmark.java | 0 .../logging/log4j/perf/jmh/AsyncLoggersLocationBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/ClocksBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/CollectionsBenchmark.java| 0 .../log4j/perf/jmh/ConcurrentAsyncLoggerToFileBenchmark.java | 0 .../log4j/perf/jmh/ConfiguratorInitializeBenchmark.java| 0 .../apache/logging/log4j/perf/jmh/DateTimeFormatBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/DebugDisabledBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/FileAppenderBenchmark.java | 0 .../logging/log4j/perf/jmh/FileAppenderParamsBenchmark.java| 0 .../logging/log4j/perf/jmh/FileAppenderThrowableBenchmark.java | 0 .../log4j/perf/jmh/FileAppenderWithLocationBenchmark.java | 0 .../logging/log4j/perf/jmh/FormatterLoggerBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/JdbcAppenderBenchmark.java | 0 .../log4j/perf/jmh/Log4j2AppenderComparisonBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/Log4jLogEventBenchmark.java | 0 .../log4j/perf/jmh/LogBuilderMarkerFilterBenchmark.java| 0 .../apache/logging/log4j/perf/jmh/LoggerConfigBenchmark.java | 0 .../logging/log4j/perf/jmh/LoggingDisabledBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/MDCFilterBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/MarkerFilterBenchmark.java | 0 .../logging/log4j/perf/jmh/MemoryHandlerJULBenchmark.java | 0 .../log4j/perf/jmh/MemoryHandlerJULLocationBenchmark.java | 0 .../logging/log4j/perf/jmh/NamePatternConverterBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/NanotimeBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/OutputBenchmark.java | 0 .../logging/log4j/perf/jmh/ParameterizedMessageBenchmark.java | 0 .../log4j/perf/jmh/ParameterizedMessageInliningBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/PatternLayoutBenchmark.java | 0 .../log4j/perf/jmh/PatternLayoutComparisonBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/ReflectionBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/SimpleBenchmark.java | 0 .../logging/log4j/perf/jmh/SortedArrayVsHashMapBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/StackWalkBenchmark.java | 0 .../logging/log4j/perf/jmh/StringBuilderEscapeBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/StringEncodingBenchmark.java | 0 .../logging/log4j/perf/jmh/TextEncoderHelperBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/ThreadContextBenchmark.java | 0 .../perf/jmh/ThreadLocalVsConcurrentHashMapBenchmark.java | 0 .../logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java | 0 .../logging/log4j/perf/jmh/ThreadsafeDateFormatBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/TimeFormatBenchmark.java | 0 .../java/org/apache/logging/log4j/perf/jmh/UnboxBenchmark.java | 0 .../apache/logging/log4j/perf/jmh/UuidGeneratorBenchmark.java | 0 .../org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java| 0 .../java/org/apache/logging/log4j/perf/jmh/package-info.java | 0 .../org/apache/logging/log4j/perf/nogc/AbstractLogger.java | 0 .../java/org/apache/logging/log4j/perf/nogc/ClassicLogger.java | 0 .../java/org/apache/logging/log4j/perf/nogc/DemoAppender.java | 0 .../java/org/apache/logging/log4j/perf/nogc/NoGcLayout.java| 0 .../java/org/apache/logging/log4j/perf/nogc/NoGcLogger.java| 0
(logging-log4j2) 04/09: Remove unused `benchmark.yml` workflow
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 09cb59ea72980efff82a4bcb0c8525c706e675d9 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:51:49 2023 +0100 Remove unused `benchmark.yml` workflow --- .github/workflows/benchmark.yml | 236 1 file changed, 236 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 40dc664e77..00 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,236 +0,0 @@ -# -# 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. -# - -name: benchmark - -on: [ workflow_dispatch ] - -jobs: - - build: - -if: github.repository == 'apache/logging-log4j2' - -runs-on: ubuntu-latest - -steps: - - - name: Checkout repository -uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 - - - name: Set up JDK 11 -uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # 3.13.0 -with: - distribution: temurin - java-version: 11 - java-package: jdk - architecture: x64 - cache: maven - - - name: Build with Maven -shell: bash -run: | - ./mvnw \ ---show-version --batch-mode --errors --no-transfer-progress \ --DskipTests=true \ ---projects log4j-perf \ ---also-make \ -package - - - name: Upload built sources -uses: actions/upload-artifact@v3 -with: - name: benchmarks.jar - path: log4j-perf/target/benchmarks.jar - - run: - -needs: build - -runs-on: ${{ matrix.os }} - -strategy: - matrix: -os: [ macos-latest, ubuntu-latest, windows-latest ] -jdk: [ 11, 17 ] -concurrency: [ 1, 8 ] -jmhCommand: - - "-t $CONCURRENCY -f 3 -wi 3 -w 10s -i 4 -r 20s -prof gc -prof perfnorm -rf json -rff results-layout-jtl.json '.*JsonTemplateLayoutBenchmark.*Jtl4EcsLayout'" - - "-t $CONCURRENCY -f 3 -wi 3 -w 10s -i 4 -r 20s -prof gc -prof perfnorm -rf json -rff results-util-instant-format.json '.*InstantFormatBenchmark.*'" - -steps: - - - name: Checkout repository -uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 - - - name: Download built sources -uses: actions/download-artifact@v3 -with: - name: benchmarks.jar - path: log4j-perf/target - - - name: Set up JDK ${{ matrix.jdk }} -if: matrix.jdk != 11 -uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # 3.13.0 -with: - distribution: temurin - java-version: ${{ matrix.jdk }} - java-package: jdk - architecture: x64 - cache: maven - - - name: Run benchmarks -timeout-minutes: 120 -shell: bash -run: | - export CONCURRENCY=${{ matrix.concurrency }} - java \ --jar log4j-perf/target/benchmarks.jar \ -${{ matrix.jmhCommand }} - - - name: Stage benchmark results for commit -shell: bash -run: | - - # Determine the artifact version. - set -x - ./mvnw \ ---batch-mode --quiet \ --DforceStdout=true \ --Dexpression=project.version \ -help:evaluate \ -| tee mvnw-project-version.out - echo - - # Determine certain file path properties. - export REVISION=$(&1 | tee git-push.out -if [ $? -eq 0 ]; then - exit 0 -else - set -e - let RETRY+=1 - echo "retry #$RETRY" - git pull -r origin gh-pages -fi - done - - index: - -runs-on: ubuntu-latest -needs: run - -steps: - - - name: Checkout repository -uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 -with: - ref: gh-pages - - - name: Setup Python 3 -uses:
(logging-log4j2) 01/09: Remove deprecated `log4j-distribution` et al.
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 7032d68b286aaa1963d40a63ee5feb68ddb59546 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:39:46 2023 +0100 Remove deprecated `log4j-distribution` et al. --- log4j-distribution/src/assembly/bin.xml | 56 --- log4j-distribution/src/assembly/src.xml | 80 - src/assembly/site.xml | 31 - 3 files changed, 167 deletions(-) diff --git a/log4j-distribution/src/assembly/bin.xml b/log4j-distribution/src/assembly/bin.xml deleted file mode 100644 index 2c691abed4..00 --- a/log4j-distribution/src/assembly/bin.xml +++ /dev/null @@ -1,56 +0,0 @@ - - -bin - -tar.gz -zip - -apache-log4j-${project.version}-bin -false - - -true - - - - - -org.apache.logging.log4j:log4j-* - - -false - - - - - -.. - -LICENSE.txt -NOTICE.txt - - - - - -../RELEASE-NOTES.adoc -. -RELEASE-NOTES.adoc - - - diff --git a/log4j-distribution/src/assembly/src.xml b/log4j-distribution/src/assembly/src.xml deleted file mode 100644 index 058ed56820..00 --- a/log4j-distribution/src/assembly/src.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - src - -zip -tar.gz - - apache-log4j-${project.version}-src - - - - .. - / - true - -**/flume-og/** - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*] - - - - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?Vagrantfile(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?Dockerfile(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?] - - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser] - - - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup] - %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties] - - - - - diff --git a/src/assembly/site.xml b/src/assembly/site.xml deleted file mode 100644 index 88292eb292..00 --- a/src/assembly/site.xml +++ /dev/null @@ -1,31 +0,0 @@ - - -http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0; - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd;> - site - -zip - - - - ${stagingSiteURL} - ${stagingSiteURL} - - -
(logging-log4j2) 02/09: Sync `pom.xml`s with the ones in `2.x`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 4f1bcdc8b12a8a10c36f1c69db111a1956f888b3 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:46:01 2023 +0100 Sync `pom.xml`s with the ones in `2.x` --- log4j-1.2-api/pom.xml| 2 - log4j-appserver/pom.xml | 2 - log4j-core-its/pom.xml | 2 - log4j-csv/pom.xml| 2 - log4j-distribution/pom.xml | 576 --- log4j-docker/pom.xml | 2 - log4j-flume-ng/pom.xml | 2 - log4j-gctests/pom.xml| 2 - log4j-iostreams/pom.xml | 2 - log4j-jcl/pom.xml| 2 - log4j-jdbc-dbcp2/pom.xml | 2 - log4j-jdbc/pom.xml | 2 - log4j-jndi-test/pom.xml | 2 - log4j-jndi/pom.xml | 2 - log4j-kubernetes/pom.xml | 2 - log4j-layout-jackson-xml/pom.xml | 2 - log4j-layout-jackson/pom.xml | 2 - log4j-layout-template-json-test/pom.xml | 2 - log4j-layout-template-json/pom.xml | 2 - log4j-mongodb4/pom.xml | 2 - log4j-osgi/pom.xml | 2 - log4j-plugin-processor/pom.xml | 2 - log4j-plugins-test/pom.xml | 2 - log4j-plugins/pom.xml| 2 - log4j-slf4j-impl/pom.xml | 2 - log4j-slf4j2-impl/pom.xml| 2 - log4j-spring-cloud-config-client/pom.xml | 2 - log4j-to-jul/pom.xml | 2 - log4j-to-slf4j/pom.xml | 2 - pom.xml | 53 ++- 30 files changed, 49 insertions(+), 636 deletions(-) diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml index 15ec761ae2..95ff919fd6 100644 --- a/log4j-1.2-api/pom.xml +++ b/log4j-1.2-api/pom.xml @@ -30,8 +30,6 @@ The Apache Log4j 1.x Compatibility API ${basedir}/.. -Log4j 1.2 Documentation -/log4j12-api -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> - 4.0.0 - -org.apache.logging.log4j -log4j -${revision} -../log4j-parent - - - log4j-distribution - pom - Log4j Distribution - The Apache Log4j distribution archives. - -true -true -true -true -4.5.13 -4.4.12 -1.7.36 -1.1.10.5 -3.1.7 - - - - - -org.slf4j -slf4j-api -${slf4j.version} - - -org.apache.httpcomponents -httpcore -${httpcore.version} - - -org.apache.httpcomponents -httpclient -${httpclient.version} - - -org.xerial.snappy -snappy-java -${snappy.version} - - - - - - - org.apache.logging.log4j - log4j-1.2-api - ${project.version} - - - org.apache.logging.log4j - log4j-1.2-api - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-api - ${project.version} - - - org.apache.logging.log4j - log4j-api - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-appserver - ${project.version} - - - org.apache.logging.log4j - log4j-appserver - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-core - ${project.version} - - - org.apache.logging.log4j - log4j-core - ${project.version} - sources - - - org.apache.logging.log4j - log4j-core-test - ${project.version} - - - org.apache.logging.log4j - log4j-core-test - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-csv - ${project.version} - - - org.apache.logging.log4j - log4j-csv - ${project.version} - sources - - - org.apache.logging.log4j - log4j-docker - ${project.version} - - - org.apache.logging.log4j - log4j-docker - ${project.version} - sources - - - - org.apache.logging.log4j - log4j-flume-ng - ${project.version} - - - org.apache.httpcomponents - httpcore - - - - - org.apache.logging.log4j - log4j-flume-ng - ${project.version} - sources - - - org.apache.httpcomponents - httpcore - - - - - - org.apache.logging.log4j - log4j-iostreams -
(logging-log4j2) 07/09: Rename `.yml` to `.yaml`, the official extension
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 8a82c74e92e5b0f7f26ed7cdaa989bdd62fd8ec1 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 22:07:22 2023 +0100 Rename `.yml` to `.yaml`, the official extension --- .github/{dependabot.yml => dependabot.yaml} | 0 .github/workflows/{build.yml => build.yaml} | 0 .github/workflows/{codeql-analysis.yml => codeql-analysis.yaml} | 0 .../java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java | 2 +- .../logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java | 2 +- .../core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java | 2 +- ...PatternConverterTest.yml => SequenceNumberPatternConverterTest.yaml} | 0 ...PaddedTest.yml => SequenceNumberPatternConverterZeroPaddedTest.yaml} | 0 .../src/test/resources/{log4j2-2134.yml => log4j2-2134.yaml}| 0 9 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yaml similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yaml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build.yaml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yaml similarity index 100% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/codeql-analysis.yaml diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java index f7a8086b96..641326d564 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/JiraLog4j2_2134Test.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; @Tag("yaml") -@LoggerContextSource("log4j2-2134.yml") +@LoggerContextSource("log4j2-2134.yaml") public class JiraLog4j2_2134Test { @Test diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java index 69e3b315b4..60ff42bc98 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterTest.java @@ -27,7 +27,7 @@ import org.apache.logging.log4j.core.test.junit.LoggerContextSource; import org.apache.logging.log4j.core.test.junit.Named; import org.junit.jupiter.api.Test; -@LoggerContextSource("SequenceNumberPatternConverterTest.yml") +@LoggerContextSource("SequenceNumberPatternConverterTest.yaml") public class SequenceNumberPatternConverterTest { @Test diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java index feb2a2b4d8..049fe51c72 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/SequenceNumberPatternConverterZeroPaddedTest.java @@ -27,7 +27,7 @@ import org.apache.logging.log4j.core.test.junit.LoggerContextSource; import org.apache.logging.log4j.core.test.junit.Named; import org.junit.jupiter.api.Test; -@LoggerContextSource("SequenceNumberPatternConverterZeroPaddedTest.yml") +@LoggerContextSource("SequenceNumberPatternConverterZeroPaddedTest.yaml") public class SequenceNumberPatternConverterZeroPaddedTest { @Test diff --git a/log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yml b/log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yaml similarity index 100% rename from log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yml rename to log4j-core-test/src/test/resources/SequenceNumberPatternConverterTest.yaml diff --git a/log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yml b/log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yaml similarity index 100% rename from log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yml rename to log4j-core-test/src/test/resources/SequenceNumberPatternConverterZeroPaddedTest.yaml diff --git a/log4j-core-test/src/test/resources/log4j2-2134.yml
(logging-log4j2) 09/09: Port `log4j-to-slf4j` changes from `2.x`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 37157b735236456e9cf1c782d018192f482298f2 Author: Volkan Yazıcı AuthorDate: Tue Nov 28 21:37:48 2023 +0100 Port `log4j-to-slf4j` changes from `2.x` --- log4j-to-slf4j/pom.xml | 39 - .../java/org/apache/logging/slf4j/SLF4JLogger.java | 3 - .../apache/logging/slf4j/SLF4JLoggerContext.java | 3 - .../logging/slf4j/SLF4JLoggerContextFactory.java | 3 - .../logging/slf4j/CallerInformationTest.java | 11 +- .../apache/logging/slf4j/Log4j2Jira1688Test.java | 10 +- .../org/apache/logging/slf4j/LogBuilderTest.java | 17 +-- .../logging/slf4j/LoggerContextResolver.java | 166 + .../apache/logging/slf4j/LoggerContextRule.java| 72 - .../apache/logging/slf4j/LoggerContextSource.java | 52 +++ .../org/apache/logging/slf4j/LoggerResolver.java | 84 +++ .../java/org/apache/logging/slf4j/LoggerTest.java | 32 ++-- .../logging/slf4j/CallerInformationTest.xml} | 0 .../apache/logging/slf4j/LogBuilderTest.xml} | 0 .../apache/logging/slf4j/LoggerTest.xml} | 0 15 files changed, 370 insertions(+), 122 deletions(-) diff --git a/log4j-to-slf4j/pom.xml b/log4j-to-slf4j/pom.xml index c0334118ae..6a525d88ff 100644 --- a/log4j-to-slf4j/pom.xml +++ b/log4j-to-slf4j/pom.xml @@ -34,11 +34,16 @@ -3 +[1.7,3) - org.slf4j.*;version="${range;[==,${slf4j.support.bound})}" + org.slf4j.*;version="${slf4j.support.range}" + + + org.slf4j;substitute="slf4j-api" + @@ -90,6 +95,36 @@ test-jar test + + org.apache.logging.log4j + log4j-api-test + test + + + + + +org.apache.maven.plugins +maven-enforcer-plugin + + +ban-logging-dependencies + + + + +ch.qos.logback:*:*:*:test + + + + + + + + + diff --git a/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java b/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java index 775532367b..64be7b447c 100644 --- a/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java +++ b/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java @@ -29,9 +29,6 @@ import org.slf4j.LoggerFactory; import org.slf4j.MarkerFactory; import org.slf4j.spi.LocationAwareLogger; -/** - * - */ public class SLF4JLogger extends AbstractLogger { /** diff --git a/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContext.java b/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContext.java index d2b922be81..f0aee0af41 100644 --- a/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContext.java +++ b/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContext.java @@ -22,9 +22,6 @@ import org.apache.logging.log4j.spi.LoggerContext; import org.apache.logging.log4j.spi.LoggerRegistry; import org.slf4j.LoggerFactory; -/** - * - */ public class SLF4JLoggerContext implements LoggerContext { private final LoggerRegistry loggerRegistry = new LoggerRegistry<>(); diff --git a/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java b/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java index 510d07b8aa..e1ca5d4483 100644 --- a/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java +++ b/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java @@ -22,9 +22,6 @@ import org.apache.logging.log4j.spi.LoggerContextFactory; import org.apache.logging.log4j.status.StatusLogger; import org.apache.logging.log4j.util.LoaderUtil; -/** - * - */ public class SLF4JLoggerContextFactory implements LoggerContextFactory { private static final StatusLogger LOGGER = StatusLogger.getLogger(); private static final LoggerContext context = new SLF4JLoggerContext(); diff --git a/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/CallerInformationTest.java b/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/CallerInformationTest.java index 50f7deb940..36b788e458 100644 --- a/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/CallerInformationTest.java +++ b/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/CallerInformationTest.java @@ -22,16 +22,13 @@ import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.testUtil.StringListAppender; import java.util.List; import org.apache.logging.log4j.LogManager; -import org.junit.ClassRule; -import org.junit.Test;
(logging-log4j2) 03/09: Rename `log4j-osgi` to `log4j-osgi-test`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit bfc65f240cbde97d124012290af7a7634e5963e4 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 15:48:12 2023 +0100 Rename `log4j-osgi` to `log4j-osgi-test` --- {log4j-osgi => log4j-osgi-test}/pom.xml | 2 +- .../org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java| 0 .../test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java | 0 .../apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java | 0 .../java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java | 0 .../logging/log4j/osgi/tests/equinox/EquinoxLoadApiBundleTest.java| 0 .../apache/logging/log4j/osgi/tests/felix/FelixLoadApiBundleTest.java | 0 .../java/org/apache/logging/log4j/osgi/tests/junit/OsgiTestRule.java | 0 {log4j-osgi => log4j-osgi-test}/src/test/resources/log4j2.custom | 0 pom.xml | 2 +- src/site/asciidoc/runtime-dependencies.adoc | 4 14 files changed, 2 insertions(+), 6 deletions(-) diff --git a/log4j-osgi/pom.xml b/log4j-osgi-test/pom.xml similarity index 99% rename from log4j-osgi/pom.xml rename to log4j-osgi-test/pom.xml index fb2472fbdb..34bb227181 100644 --- a/log4j-osgi/pom.xml +++ b/log4j-osgi-test/pom.xml @@ -24,7 +24,7 @@ ../log4j-parent - log4j-osgi + log4j-osgi-test jar Apache Log4j OSGi The Apache Log4j OSGi tests diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractOsgiTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfiguration.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CustomConfigurationFactory.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/JULProviderTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java similarity index 100% rename from log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java rename to log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/SLF4JProviderTest.java diff --git a/log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/equinox/EquinoxLoadApiBundleTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/equinox/EquinoxLoadApiBundleTest.java similarity index 100% rename from
(logging-log4j2) 06/09: Revamp README
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-sync-log4j-to-slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 1a872d499c4fa44dd0d3f861c7fb425e1dca0e44 Author: Volkan Yazıcı AuthorDate: Mon Nov 27 22:04:50 2023 +0100 Revamp README --- README.adoc | 23 README.md | 117 2 files changed, 23 insertions(+), 117 deletions(-) diff --git a/README.adoc b/README.adoc new file mode 100644 index 00..8c85d68c66 --- /dev/null +++ b/README.adoc @@ -0,0 +1,23 @@ + +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. + + +https://github.com/apache/logging-log4j2/actions/workflows/build.yaml[image:https://img.shields.io/github/actions/workflow/status/apache/logging-log4j2/build.yaml?branch=main=build%20%283.x%29[Build (3.x)]] +https://search.maven.org/artifact/org.apache.logging.log4j/log4j-api[image:https://img.shields.io/maven-central/v/org.apache.logging.log4j/log4j-api?versionPrefix=3.[Maven Central (3.x)]] +https://github.com/apache/logging-log4j2/security/code-scanning[image:https://github.com/apache/logging-log4j2/actions/workflows/codeql-analysis.yaml/badge.svg?branch=main[CodeQL (3.x)]] + +Apache Log4j is a versatile, industrial-grade Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. +For further information (support, download, etc.) see https://logging.apache.org/log4j[the project website]. diff --git a/README.md b/README.md deleted file mode 100644 index 83534e3430..00 --- a/README.md +++ /dev/null @@ -1,117 +0,0 @@ - - -# [Apache Log4j 3.x](https://logging.apache.org/log4j/2.x/) - -Apache Log4j 3.x is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, -and provides many of the improvements available in Logback while fixing some inherent problems in Logback's architecture. - -[![Maven Central](https://img.shields.io/maven-central/v/org.apache.logging.log4j/log4j-api.svg)](https://search.maven.org/artifact/org.apache.logging.log4j/log4j-api) -[![build (2.x)](https://img.shields.io/github/actions/workflow/status/apache/logging-log4j2/build.yml?branch=release-2.x=build%20%282.x%29)](https://github.com/apache/logging-log4j2/actions/workflows/build.yml) -[![build (3.x)](https://img.shields.io/github/actions/workflow/status/apache/logging-log4j2/build.yml?branch=master=build%20%283.x%29)](https://github.com/apache/logging-log4j2/actions/workflows/build.yml) -![CodeQL](https://github.com/apache/logging-log4j2/actions/workflows/codeql-analysis.yml/badge.svg) - -## Pull Requests on Github - -By sending a pull request you grant the Apache Software Foundation sufficient rights to use and release the submitted -work under the Apache license. You grant the same rights (copyright license, patent license, etc.) to the -Apache Software Foundation as if you have signed a Contributor License Agreement. For contributions that are -judged to be non-trivial, you will be asked to actually sign a [Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). - -## Usage - -Users should refer to [Maven, Ivy, Gradle, and SBT Artifacts](http://logging.apache.org/log4j/2.x/maven-artifacts.html) -on the Log4j web site for instructions on how to include Log4j into their project using their chosen build tool. - -Basic usage of the `Logger` API: - -```java -package com.example; - -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; - -public class Example { -private static final Logger LOGGER = LogManager.getLogger(); - -public static void main(String... args) { -String thing = args.length > 0 ? args[0] : "world"; -LOGGER.info("Hello, {}!", thing); -LOGGER.debug("Got calculated value only if debug enabled: {}", () -> doSomeCalculation()); -} - -private static Object doSomeCalculation() { -// do some complicated calculation -} -} -``` - -And an example `log4j2.xml` configuration file: - -```xml - - - - - - - - - - - - - - -```
(logging-chainsaw) branch master updated: upgraded to latest log4j
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new 8d585fa upgraded to latest log4j 8d585fa is described below commit 8d585faee191c3c59cdcfd48125e7609f0773834 Author: Christian Grobmeier AuthorDate: Tue Nov 28 21:33:20 2023 +0100 upgraded to latest log4j --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ae18851..179cd90 100644 --- a/pom.xml +++ b/pom.xml @@ -121,7 +121,7 @@ org.apache.log4j.chainsaw.ChainsawStarter 11 11 -2.20.0 +2.22.0 false 2.1.0 Robert Middleton
(logging-chainsaw) 02/02: extracted main method to it's own starter component, refactored splash according to this
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit e17dd2309d950fb654c62aaa1ddc592ee633ce06 Author: Christian Grobmeier AuthorDate: Tue Nov 28 21:31:52 2023 +0100 extracted main method to it's own starter component, refactored splash according to this --- README.md | 4 + pom.xml| 2 +- .../org/apache/log4j/chainsaw/ChainsawStarter.java | 135 + src/main/java/org/apache/log4j/chainsaw/LogUI.java | 133 +--- .../{ => components/splash}/ChainsawSplash.java| 2 +- .../chainsaw/components/splash/SplashViewer.java | 22 6 files changed, 165 insertions(+), 133 deletions(-) diff --git a/README.md b/README.md index 106c9f6..0492dfc 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Apache Chainsaw is a GUI log file viewer More information can be found on the Chainsaw website: http://logging.apache.org/chainsaw/2.x/ +## Starting + +Please start the ChainsawStarter class, which has a main method. + ## Issue tracking We have been using Jira in the past: diff --git a/pom.xml b/pom.xml index 8baee57..ae18851 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ -org.apache.log4j.chainsaw.LogUI + org.apache.log4j.chainsaw.ChainsawStarter 11 11 2.20.0 diff --git a/src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java b/src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java new file mode 100644 index 000..896198d --- /dev/null +++ b/src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java @@ -0,0 +1,135 @@ +package org.apache.log4j.chainsaw; + +import org.apache.commons.configuration2.AbstractConfiguration; +import org.apache.log4j.chainsaw.osx.OSXIntegration; +import org.apache.log4j.chainsaw.prefs.SettingsManager; +import org.apache.log4j.chainsaw.components.splash.SplashViewer; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.core.LoggerContext; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.Policy; +import java.util.Locale; + +public class ChainsawStarter { +private static Logger logger = LogManager.getLogger(ChainsawStarter.class); + + + +/** + * Starts Chainsaw by attaching a new instance to the Log4J main root Logger + * via a ChainsawAppender, and activates itself + * + * @param args + */ +public static void main(String[] args) { +if (OSXIntegration.IS_OSX) { +System.setProperty("apple.laf.useScreenMenuBar", "true"); +} + +AbstractConfiguration configuration = SettingsManager.getInstance().getGlobalConfiguration(); + +EventQueue.invokeLater(() -> { +String lookAndFeelClassName = configuration.getString("lookAndFeelClassName"); +if (lookAndFeelClassName == null || lookAndFeelClassName.trim().isEmpty()) { +String osName = System.getProperty("os.name"); +if (osName.toLowerCase(Locale.ENGLISH).startsWith("mac")) { +//no need to assign look and feel +} else if (osName.toLowerCase(Locale.ENGLISH).startsWith("windows")) { +lookAndFeelClassName = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; + configuration.setProperty("lookAndFeelClassName",lookAndFeelClassName); +} else if (osName.toLowerCase(Locale.ENGLISH).startsWith("linux")) { +lookAndFeelClassName = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"; + configuration.setProperty("lookAndFeelClassName",lookAndFeelClassName); +} +} + +if (lookAndFeelClassName != null && !(lookAndFeelClassName.trim().isEmpty())) { +try{ +UIManager.setLookAndFeel(lookAndFeelClassName); +}catch(Exception ex){} +}else{ +try{ + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); +}catch(Exception ex){} +} +createChainsawGUI(null); +}); +} + +/** + * Creates, activates, and then shows the Chainsaw GUI, optionally showing + * the splash screen, and using the passed shutdown action when the user + * requests to exit the application (if null, then Chainsaw will exit the vm) + * + * @param newShutdownAction DOCUMENT ME! + */ +public static void createChainsawGUI(Action newShutdownAction) { +AbstractConfiguration config =
(logging-chainsaw) 01/02: removed unused override, added @override annotation
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git commit c06e84d2b854935d511e3701cee9577c8862481b Author: Christian Grobmeier AuthorDate: Tue Nov 28 20:43:01 2023 +0100 removed unused override, added @override annotation --- src/main/java/org/apache/log4j/chainsaw/LogUI.java | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/LogUI.java b/src/main/java/org/apache/log4j/chainsaw/LogUI.java index 7f63242..22558e4 100644 --- a/src/main/java/org/apache/log4j/chainsaw/LogUI.java +++ b/src/main/java/org/apache/log4j/chainsaw/LogUI.java @@ -262,10 +262,7 @@ public class LogUI extends JFrame { // code loaded from our custom classloader. // crossing fingers... Policy.setPolicy(new Policy() { - -public void refresh() { -} - +@Override public PermissionCollection getPermissions(CodeSource codesource) { Permissions perms = new Permissions(); perms.add(new AllPermission());
(logging-chainsaw) branch master updated (7b6be75 -> e17dd23)
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git from 7b6be75 Use String#isEmpty() new c06e84d removed unused override, added @override annotation new e17dd23 extracted main method to it's own starter component, refactored splash according to this The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: README.md | 4 + pom.xml| 2 +- .../org/apache/log4j/chainsaw/ChainsawStarter.java | 135 src/main/java/org/apache/log4j/chainsaw/LogUI.java | 136 + .../{ => components/splash}/ChainsawSplash.java| 2 +- .../chainsaw/components/splash/SplashViewer.java | 22 6 files changed, 165 insertions(+), 136 deletions(-) create mode 100644 src/main/java/org/apache/log4j/chainsaw/ChainsawStarter.java rename src/main/java/org/apache/log4j/chainsaw/{ => components/splash}/ChainsawSplash.java (98%) create mode 100644 src/main/java/org/apache/log4j/chainsaw/components/splash/SplashViewer.java
(logging-site) branch asf-site updated (e0f995de -> 2d514928)
This is an automated email from the ASF dual-hosted git repository. grobmeier pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/logging-site.git from e0f995de Automatic Site Publish by Buildbot add d6c33c05 Automatic Site Publish by Buildbot add 5598cd4f Automatic Site Publish by Buildbot add b36e9db2 Automatic Site Publish by Buildbot add bfe4ea85 Automatic Site Publish by Buildbot add 0a7904b3 Automatic Site Publish by Buildbot add 2d514928 Automatic Site Publish by Buildbot No new revisions were added by this update. Summary of changes: .../2023/11/17/flume-joins-logging-services.html | 34 ++-- .../{index.html => 2023/11/28/new-pmc-member.html} | 93 +++ content/blog/index.html| 48 -- content/charter.html | 34 ++-- content/dormant.html | 48 -- content/feed.xml | 32 +++- content/guidelines.html| 34 ++-- content/index.html | 64 +--- content/mailing-lists.html | 34 ++-- content/{mailing-lists.html => processes.html} | 174 ++--- content/security.html | 34 ++-- content/security/index.html| 34 ++-- content/security/known-vulnerabilities.html| 34 ++-- content/support.html | 34 ++-- content/team-list.html | 34 ++-- content/what-is-logging.html | 34 ++-- 16 files changed, 572 insertions(+), 227 deletions(-) copy content/blog/{index.html => 2023/11/28/new-pmc-member.html} (66%) copy content/{mailing-lists.html => processes.html} (54%)
(logging-site) branch asf-staging updated: Automatic Site Publish by Buildbot
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-staging in repository https://gitbox.apache.org/repos/asf/logging-site.git The following commit(s) were added to refs/heads/asf-staging by this push: new 2d514928 Automatic Site Publish by Buildbot 2d514928 is described below commit 2d5149289a3f6c3bfa37a529a01c4a0ae5a8b0c8 Author: buildbot AuthorDate: Tue Nov 28 19:14:31 2023 + Automatic Site Publish by Buildbot --- .../2023/11/17/flume-joins-logging-services.html | 14 ++--- .../{index.html => 2023/11/28/new-pmc-member.html} | 73 +- content/blog/index.html| 28 ++--- content/charter.html | 14 ++--- content/dormant.html | 28 - content/feed.xml | 32 +- content/guidelines.html| 14 ++--- content/index.html | 42 ++--- content/mailing-lists.html | 14 ++--- content/processes.html | 14 ++--- content/security.html | 14 ++--- content/security/index.html| 14 ++--- content/security/known-vulnerabilities.html| 14 ++--- content/support.html | 14 ++--- content/team-list.html | 14 ++--- content/what-is-logging.html | 14 ++--- 16 files changed, 208 insertions(+), 149 deletions(-) diff --git a/content/blog/2023/11/17/flume-joins-logging-services.html b/content/blog/2023/11/17/flume-joins-logging-services.html index 2f76e660..c7eaba16 100644 --- a/content/blog/2023/11/17/flume-joins-logging-services.html +++ b/content/blog/2023/11/17/flume-joins-logging-services.html @@ -41,15 +41,15 @@ -Apache Log4j® +Apache Log4j® -Apache Log4j® for Kotlin +Apache Log4j® Kotlin -Apache Log4j® for Scala +Apache Log4j® Scala @@ -57,11 +57,11 @@ -Apache Chainsaw +Apache Chainsaw -Apache Log4j® Audit +Apache Log4j® Audit @@ -103,11 +103,11 @@ -Apache Log4j® 1.x +Apache Log4j® 1 -Apache log4j® 1 extras +Apache Log4j® 1 Extras diff --git a/content/blog/index.html b/content/blog/2023/11/28/new-pmc-member.html similarity index 74% copy from content/blog/index.html copy to content/blog/2023/11/28/new-pmc-member.html index 8681e35a..7723c343 100644 --- a/content/blog/index.html +++ b/content/blog/2023/11/28/new-pmc-member.html @@ -41,15 +41,15 @@ -Apache Log4j® +Apache Log4j® -Apache Log4j® for Kotlin +Apache Log4j® Kotlin -Apache Log4j® for Scala +Apache Log4j® Scala @@ -57,11 +57,11 @@ -Apache Chainsaw +Apache Chainsaw -Apache Log4j® Audit +Apache Log4j® Audit @@ -103,11 +103,11 @@
(logging-site) branch jekyll updated: Update projects list
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch jekyll in repository https://gitbox.apache.org/repos/asf/logging-site.git The following commit(s) were added to refs/heads/jekyll by this push: new 9eec0e76 Update projects list 9eec0e76 is described below commit 9eec0e76c2088339b6a66c5ae22b42f5ef06a9d1 Author: Volkan Yazıcı AuthorDate: Tue Nov 28 20:14:14 2023 +0100 Update projects list --- _data/projects.yml | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/_data/projects.yml b/_data/projects.yml index a4a7b855..99aba331 100644 --- a/_data/projects.yml +++ b/_data/projects.yml @@ -1,55 +1,55 @@ - name: Apache Log4j® - description: Log4j 2 provides both a portable logging API and implementation for Java with significant improvements over its predecessor, Log4j 1.x. - url: /log4j/2.x/index.html + description: A versatile, industrial-grade Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. + url: /log4j status: active section: creation -- name: Apache Log4j® for Kotlin - description: Kotlin API for Log4j 2. - url: /log4j/kotlin/index.html +- name: Apache Log4j® Kotlin + description: A Kotlin-friendly interface to log against the Log4j® API. + url: /log4j/kotlin status: active section: creation -- name: Apache Log4j® for Scala - description: Scala API for Log4j 2. - url: /log4j/scala/index.html +- name: Apache Log4j® Scala + description: A Scala-friendly interface to log against the Log4j® API. + url: /log4j/scala status: active section: creation - name: Apache log4cxx - description: Apache log4cxx is a logging framework for C++ patterned after log4j. + description: A logging framework for C++ patterned after Log4j®. url: /log4cxx status: active section: creation - name: Apache Chainsaw - description: A GUI based log viewer. Chainsaw is a companion application to log4j written by members of the log4j development community. - url: /chainsaw/2.x/index.html + description: A GUI-based log viewer intended as a companion to Log4j®. + url: /chainsaw status: active section: processing - name: Apache Log4j® Audit - description: Audit logging framework built upon Apache Log4j® 2. - url: /log4j-audit/latest/index.html + description: Audit logging framework built upon Apache Log4j®. + url: /log4j-audit/latest status: active section: processing - name: Apache Flume description: Distributed, reliable, and available service for efficiently collecting, aggregating, and moving large amounts of log data. url: "https://flume.apache.org; status: active - section: processing + section: processing - name: Apache Log4Net - description: A port of the original Apache log4j framework to the Microsoft .NET runtime. + description: A port of the Log4j® to the Microsoft .NET runtime. url: /log4net status: active section: creation -- name: Apache Log4j® 1.x - description: The original Log4j®. Reached End-Of-Life August 2015. - url: /log4j/1.2/index.html +- name: Apache Log4j® 1 + description: The very first Log4j® major release. Reached End-Of-Life August 2015. + url: /log4j/1.x status: dormant section: creation -- name: Apache log4j® 1 extras - description: Extras for log4j 1.x, like companions, receivers and more. - url: /log4j/extras/index.html +- name: Apache Log4j® 1 Extras + description: Extras for Log4j® 1; companions, receivers, and more. + url: /log4j/extras status: dormant section: creation - name: Apache log4php - description: A versatile logging framework for PHP. Originally a port of Apache log4j to PHP, it has grown to include various PHP specific features. + description: A versatile logging framework for PHP. Originally a port of Log4j® to PHP, it has grown to include various PHP specific features. url: /log4php status: dormant - section: creation \ No newline at end of file + section: creation
(logging-log4j-tools) branch doc-reference created (now 50e73e6)
This is an automated email from the ASF dual-hosted git repository. pkarwasz pushed a change to branch doc-reference in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git at 50e73e6 Add example of documentation reference This branch includes the following new commits: new 50e73e6 Add example of documentation reference The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j-tools) 01/01: Add example of documentation reference
This is an automated email from the ASF dual-hosted git repository. pkarwasz pushed a commit to branch doc-reference in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git commit 50e73e6d41d56b687cf12f34a2797630d79dfcbc Author: Piotr P. Karwasz AuthorDate: Tue Nov 28 19:43:49 2023 +0100 Add example of documentation reference This commit contains a set of AsciiDoc documents to evaluate the requirements for our documentation reference. --- log4j-doc-reference/pom.xml| 58 + .../org.apache.logging.log4j.core.Appender.adoc| 49 ...ogging.log4j.core.appender.ConsoleAppender.adoc | 80 +++ logging.log4j.core.config.AppendersPlugin.adoc | 43 ...he.logging.log4j.core.config.Configuration.adoc | 93 log4j-doc-reference/src/site/Properties/index.adoc | 83 +++ .../src/site/TypeConverters/index.adoc | 56 + .../src/test/resources/log4j-plugins.xml | 150 log4j-doc-reference/src/test/resources/log4j.xsd | 265 + pom.xml| 1 + 10 files changed, 878 insertions(+) diff --git a/log4j-doc-reference/pom.xml b/log4j-doc-reference/pom.xml new file mode 100644 index 000..084ade1 --- /dev/null +++ b/log4j-doc-reference/pom.xml @@ -0,0 +1,58 @@ + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> + 4.0.0 + +org.apache.logging.log4j +log4j-tools-parent +${revision} +../log4j-tools-parent + + + log4j-doc-reference + + +false + + +0.9.0.M2 + + + + + +org.eclipse.sisu +org.eclipse.sisu.plexus +${sisu.plexus.version} + + + + + + + org.apache.logging.log4j + log4j-core + 2.22.0 + + + org.codehaus.modello + modello-plugin-xsd + 2.1.2 + + + diff --git a/log4j-doc-reference/src/site/Core/org.apache.logging.log4j.core.Appender.adoc b/log4j-doc-reference/src/site/Core/org.apache.logging.log4j.core.Appender.adoc new file mode 100644 index 000..01ef932 --- /dev/null +++ b/log4j-doc-reference/src/site/Core/org.apache.logging.log4j.core.Appender.adoc @@ -0,0 +1,49 @@ + +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 + +https://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. + += Appender + +Appends log events. +An Appender can contain a `Layout` if applicable as well + as an `ErrorHandler`. +Typical Appender implementations coordinate with an implementation of `AbstractManager` to handle external resources such as streams, connections, and other shared state. +As Appenders are plugins, concrete implementations need to + be annotated with `@Plugin` and need to provide a static + factory method annotated with `@PluginFactory`. + +Most core plugins are written using a related Manager class that handle the actual task of serializing a + `LogEvent` to some output location. +For instance, many Appenders can take advantage of the `@OutputStreamManager` class. + +It is recommended that Appenders don't do any heavy lifting since there can be many instances of the class being used at any given time. +When resources require locking (e.g., through `@FileLock`), it is important to isolate synchronized code to prevent concurrency issues. + +== Known implementations + +[cols="1,1,5m"] +|=== +|Tag +|Type +|Description + +|`Console` +|xref:org.apache.logging.log4j.core.appender.ConsoleAppender.adoc[ConsoleAppender] +|An appender the writes to `System.out` or `System.err`. + +|`File` +|FileAppender +|An appender that writes to a file. +|=== diff --git a/log4j-doc-reference/src/site/Core/org.apache.logging.log4j.core.appender.ConsoleAppender.adoc b/log4j-doc-reference/src/site/Core/org.apache.logging.log4j.core.appender.ConsoleAppender.adoc new file mode 100644 index 000..8ed001e --- /dev/null +++ b/log4j-doc-reference/src/site/Core/org.apache.logging.log4j.core.appender.ConsoleAppender.adoc @@ -0,0 +1,80 @@ + +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
(logging-chainsaw) branch master updated: Use String#isEmpty()
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-chainsaw.git The following commit(s) were added to refs/heads/master by this push: new 7b6be75 Use String#isEmpty() 7b6be75 is described below commit 7b6be7595ac6c4eab9589be14092e712273b6252 Author: Gary Gregory AuthorDate: Tue Nov 28 12:26:49 2023 -0500 Use String#isEmpty() --- .../log4j/chainsaw/ApplicationPreferenceModel.java | 8 src/main/java/org/apache/log4j/chainsaw/LogUI.java | 4 ++-- .../apache/log4j/chainsaw/LoggerNameTreePanel.java | 10 +- .../log4j/chainsaw/ReceiverConfigurationPanel.java | 2 +- .../components/logpanel/AutoFilterComboBox.java| 2 +- .../chainsaw/components/logpanel/LogPanel.java | 22 +++--- .../receivers/PluginPropertyEditorPanel.java | 2 +- .../log4j/chainsaw/receivers/ReceiversPanel.java | 2 +- .../log4j/chainsaw/zeroconf/ZeroConfPlugin.java| 6 +++--- .../java/org/apache/log4j/rule/ExistsRule.java | 2 +- .../java/org/apache/log4j/rule/InFixToPostFix.java | 2 +- .../apache/log4j/varia/LogFilePatternReceiver.java | 6 +++--- .../org/apache/log4j/xml/LogFileXMLReceiver.java | 2 +- .../apache/log4j/xml/UtilLoggingXMLDecoder.java| 2 +- src/main/java/org/apache/log4j/xml/XMLDecoder.java | 4 ++-- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java b/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java index eac5b1e..8a4eed0 100644 --- a/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java +++ b/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java @@ -191,13 +191,13 @@ public class ApplicationPreferenceModel { */ public void apply(ApplicationPreferenceModel model) { setIdentifierExpression(model.getIdentifierExpression()); -setShowNoReceiverWarning(model.isShowNoReceiverWarning() || (model.getConfigurationURL() == null || model.getConfigurationURL().trim().equals(""))); +setShowNoReceiverWarning(model.isShowNoReceiverWarning() || (model.getConfigurationURL() == null || model.getConfigurationURL().trim().isEmpty())); setResponsiveness(model.getResponsiveness()); setTabPlacement(model.getTabPlacement()); setStatusBar(model.isStatusBar()); setToolbar(model.isToolbar()); setReceivers(model.isReceivers()); -if (model.getLookAndFeelClassName() != null && !model.getLookAndFeelClassName().trim().equals("")) { +if (model.getLookAndFeelClassName() != null && !model.getLookAndFeelClassName().trim().isEmpty()) { setLookAndFeelClassName(model.getLookAndFeelClassName()); } else { //ensure current look and feel is selected @@ -446,7 +446,7 @@ public class ApplicationPreferenceModel { */ public void setBypassConfigurationURL(String bypassConfigurationURL) { //don't change configuration URL..configurationURL is persisted on app exit -if (bypassConfigurationURL != null && bypassConfigurationURL.trim().equals("")) { +if (bypassConfigurationURL != null && bypassConfigurationURL.trim().isEmpty()) { this.bypassConfigurationURL = null; } this.bypassConfigurationURL = bypassConfigurationURL; @@ -459,7 +459,7 @@ public class ApplicationPreferenceModel { //don't add empty entries, but allow the current configuration URL to be set to an empty string Object oldValue = this.bypassConfigurationURL != null ? this.bypassConfigurationURL : this.configurationURL; bypassConfigurationURL = null; -if (configurationURL == null || configurationURL.trim().equals("")) { +if (configurationURL == null || configurationURL.trim().isEmpty()) { this.configurationURL = ""; firePropertyChange("configurationURL", oldValue, this.configurationURL); return; diff --git a/src/main/java/org/apache/log4j/chainsaw/LogUI.java b/src/main/java/org/apache/log4j/chainsaw/LogUI.java index 11d1052..7f63242 100644 --- a/src/main/java/org/apache/log4j/chainsaw/LogUI.java +++ b/src/main/java/org/apache/log4j/chainsaw/LogUI.java @@ -220,7 +220,7 @@ public class LogUI extends JFrame { EventQueue.invokeLater(() -> { String lookAndFeelClassName = configuration.getString("lookAndFeelClassName"); -if (lookAndFeelClassName == null || lookAndFeelClassName.trim().equals("")) { +if (lookAndFeelClassName == null || lookAndFeelClassName.trim().isEmpty()) { String osName = System.getProperty("os.name"); if (osName.toLowerCase(Locale.ENGLISH).startsWith("mac")) { //no need to assign look and feel @@ -233,7 +233,7 @@ public class LogUI extends JFrame {
(logging-log4j2) branch main updated: Use String#isEmpty()
This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/main by this push: new cf2ccc5149 Use String#isEmpty() cf2ccc5149 is described below commit cf2ccc51494b0c93ee770c0eed5b445daa61a675 Author: Gary Gregory AuthorDate: Tue Nov 28 12:21:07 2023 -0500 Use String#isEmpty() --- .../src/main/java/org/apache/log4j/PropertyConfigurator.java | 4 ++-- .../main/java/org/apache/log4j/config/PropertiesConfiguration.java| 4 ++-- .../src/main/java/org/apache/log4j/xml/XmlConfiguration.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java b/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java index 428ddbbe19..5d1e63ccdb 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java @@ -426,7 +426,7 @@ public class PropertyConfigurator implements Configurator { final String value = OptionConverter.findAndSubst(ADDITIVITY_PREFIX + loggerName, properties); LogLog.debug("Handling " + ADDITIVITY_PREFIX + loggerName + "=[" + value + "]"); // touch additivity only if necessary -if ((value != null) && (!value.equals(""))) { +if (value != null && !value.isEmpty()) { final boolean additivity = OptionConverter.toBoolean(value, true); LogLog.debug("Setting additivity for \"" + loggerName + "\" to " + additivity); logger.setAdditivity(additivity); @@ -581,7 +581,7 @@ public class PropertyConfigurator implements Configurator { // If value is not in the form ", appender.." or "", then we should set // the level of the loggeregory. -if (!(value.startsWith(",") || value.equals(""))) { +if (!(value.startsWith(",") || value.isEmpty())) { // just to be on the safe side... if (!st.hasMoreTokens()) { diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java index 264f6fdf12..f3ed60377b 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java @@ -389,7 +389,7 @@ public class PropertiesConfiguration extends Log4j1Configuration { final String value = OptionConverter.findAndSubst(key, props); LOGGER.debug("Handling {}=[{}]", key, value); // touch additivity only if necessary -if ((value != null) && (!value.equals(""))) { +if (value != null && !value.isEmpty()) { additivity = OptionConverter.toBoolean(value, true); } return additivity; @@ -411,7 +411,7 @@ public class PropertiesConfiguration extends Log4j1Configuration { // If value is not in the form ", appender.." or "", then we should set the level of the logger. -if (!(value.startsWith(",") || value.equals(""))) { +if (!(value.startsWith(",") || value.isEmpty())) { // just to be on the safe side... if (!st.hasMoreTokens()) { diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java b/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java index 8519d8fcd3..25f81f01db 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java @@ -725,14 +725,14 @@ public class XmlConfiguration extends Log4j1Configuration { // if the log4j.dtd is not specified in the XML file, then the // "debug" attribute is returned as the empty string. String status = "error"; -if (!debugAttrib.equals("") && !debugAttrib.equals("null")) { +if (!debugAttrib.isEmpty() && !debugAttrib.equals("null")) { status = OptionConverter.toBoolean(debugAttrib, true) ? "debug" : "error"; } else { LOGGER.debug("Ignoring " + INTERNAL_DEBUG_ATTR + " attribute."); } final String confDebug = subst(element.getAttribute(CONFIG_DEBUG_ATTR)); -if (!confDebug.equals("") && !confDebug.equals("null")) { +if (!confDebug.isEmpty() && !confDebug.equals("null")) { LOGGER.warn("The \"" + CONFIG_DEBUG_ATTR + "\" attribute is deprecated."); LOGGER.warn("Use the \"" + INTERNAL_DEBUG_ATTR + "\" attribute instead."); status = OptionConverter.toBoolean(confDebug, true) ? "debug" : "error";
(logging-log4j2) branch 2.x updated: Use String#isEmpty()
This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 8a918f55a0 Use String#isEmpty() 8a918f55a0 is described below commit 8a918f55a0dc5a93750306df19f16d68cf962019 Author: Gary Gregory AuthorDate: Tue Nov 28 12:04:42 2023 -0500 Use String#isEmpty() --- .../src/main/java/org/apache/log4j/PropertyConfigurator.java | 4 ++-- .../main/java/org/apache/log4j/config/PropertiesConfiguration.java| 4 ++-- .../src/main/java/org/apache/log4j/xml/XmlConfiguration.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java b/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java index 428ddbbe19..5d1e63ccdb 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java @@ -426,7 +426,7 @@ public class PropertyConfigurator implements Configurator { final String value = OptionConverter.findAndSubst(ADDITIVITY_PREFIX + loggerName, properties); LogLog.debug("Handling " + ADDITIVITY_PREFIX + loggerName + "=[" + value + "]"); // touch additivity only if necessary -if ((value != null) && (!value.equals(""))) { +if (value != null && !value.isEmpty()) { final boolean additivity = OptionConverter.toBoolean(value, true); LogLog.debug("Setting additivity for \"" + loggerName + "\" to " + additivity); logger.setAdditivity(additivity); @@ -581,7 +581,7 @@ public class PropertyConfigurator implements Configurator { // If value is not in the form ", appender.." or "", then we should set // the level of the loggeregory. -if (!(value.startsWith(",") || value.equals(""))) { +if (!(value.startsWith(",") || value.isEmpty())) { // just to be on the safe side... if (!st.hasMoreTokens()) { diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java index b89893b7d1..3fc3d88ffe 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java @@ -390,7 +390,7 @@ public class PropertiesConfiguration extends Log4j1Configuration { final String value = OptionConverter.findAndSubst(key, props); LOGGER.debug("Handling {}=[{}]", key, value); // touch additivity only if necessary -if ((value != null) && (!value.equals(""))) { +if (value != null && !value.isEmpty()) { additivity = OptionConverter.toBoolean(value, true); } return additivity; @@ -412,7 +412,7 @@ public class PropertiesConfiguration extends Log4j1Configuration { // If value is not in the form ", appender.." or "", then we should set the level of the logger. -if (!(value.startsWith(",") || value.equals(""))) { +if (!(value.startsWith(",") || value.isEmpty())) { // just to be on the safe side... if (!st.hasMoreTokens()) { diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java b/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java index df5f073527..0aeaa77675 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java @@ -732,14 +732,14 @@ public class XmlConfiguration extends Log4j1Configuration { // if the log4j.dtd is not specified in the XML file, then the // "debug" attribute is returned as the empty string. String status = "error"; -if (!debugAttrib.equals("") && !debugAttrib.equals("null")) { +if (!debugAttrib.isEmpty() && !debugAttrib.equals("null")) { status = OptionConverter.toBoolean(debugAttrib, true) ? "debug" : "error"; } else { LOGGER.debug("Ignoring " + INTERNAL_DEBUG_ATTR + " attribute."); } final String confDebug = subst(element.getAttribute(CONFIG_DEBUG_ATTR)); -if (!confDebug.equals("") && !confDebug.equals("null")) { +if (!confDebug.isEmpty() && !confDebug.equals("null")) { LOGGER.warn("The \"" + CONFIG_DEBUG_ATTR + "\" attribute is deprecated."); LOGGER.warn("Use the \"" + INTERNAL_DEBUG_ATTR + "\" attribute instead."); status = OptionConverter.toBoolean(confDebug, true) ? "debug" : "error";
(logging-log4j2) branch 2.x updated: Improve auxiliary support files
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 99b987d824 Improve auxiliary support files 99b987d824 is described below commit 99b987d8246b5e9bc45786584e6cdd5905175a1c Author: Volkan Yazıcı AuthorDate: Tue Nov 28 11:56:08 2023 +0100 Improve auxiliary support files --- CODE_OF_CONDUCT.md | 1 + CODE_OF_CONDUCT.md => RELEASE-NOTES.md | 3 ++- SECURITY.md| 25 +++-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index e13878a151..8f90018b7b 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,4 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. --> + See [the Apache Software Foundation's Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). diff --git a/CODE_OF_CONDUCT.md b/RELEASE-NOTES.md similarity index 87% copy from CODE_OF_CONDUCT.md copy to RELEASE-NOTES.md index e13878a151..7995588e21 100644 --- a/CODE_OF_CONDUCT.md +++ b/RELEASE-NOTES.md @@ -14,4 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. --> -See [the Apache Software Foundation's Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). + +See [the Release Notes page](https://logging.apache.org/log4j/2.x/release-notes.html). diff --git a/SECURITY.md b/SECURITY.md index faece48db7..40ce42bb33 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,13 +1,18 @@ -# Security Policy + -## Reporting a Vulnerability - -If you have encountered an unlisted security vulnerability or other unexpected behaviour that has security impact, please report them privately to the [Log4j Security Team](mailto:secur...@logging.apache.org). - -## Past Vulnerabilities - -See [Apache Log4j Security Vulnerabilities](https://logging.apache.org/log4j/2.x/security.html). +See [the Security page](https://logging.apache.org/log4j/2.x/security.html).