logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: svn commit: r1620456 - in /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core: async/ config/ config/json/ config/xml/ config/yaml/ filter/
Date Tue, 26 Aug 2014 05:11:14 GMT
Is it okay to use serialVersionUID = 1L for real (non-test) components? (I only have a vague
idea how this is used internally...)

Sent from my iPhone

> On 2014/08/25, at 23:22, ggregory@apache.org wrote:
> 
> Author: ggregory
> Date: Mon Aug 25 21:22:25 2014
> New Revision: 1620456
> 
> URL: http://svn.apache.org/r1620456
> Log:
> [LOG4J2-800] All life cycle implementations should be serializable.
> 
> Modified:
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/NullConfiguration.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/yaml/YamlConfiguration.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java
Mon Aug 25 21:22:25 2014
> @@ -67,6 +67,8 @@ import org.apache.logging.log4j.util.Str
> @Plugin(name = "asyncLogger", category = "Core", printObject = true)
> public class AsyncLoggerConfig extends LoggerConfig {
> 
> +    private static final long serialVersionUID = 1L;
> +
>     private AsyncLoggerConfigHelper helper;
> 
>     /**
> @@ -204,6 +206,8 @@ public class AsyncLoggerConfig extends L
>     @Plugin(name = "asyncRoot", category = "Core", printObject = true)
>     public static class RootLogger extends LoggerConfig {
> 
> +        private static final long serialVersionUID = 1L;
> +
>         @PluginFactory
>         public static LoggerConfig createLogger(
>                 @PluginAttribute("additivity") final String additivity,
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerContext.java
Mon Aug 25 21:22:25 2014
> @@ -27,6 +27,8 @@ import org.apache.logging.log4j.message.
>  */
> public class AsyncLoggerContext extends LoggerContext {
> 
> +    private static final long serialVersionUID = 1L;
> +
>     public AsyncLoggerContext(final String name) {
>         super(name);
>     }
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
Mon Aug 25 21:22:25 2014
> @@ -490,6 +490,8 @@ public class LoggerConfig extends Abstra
>     @Plugin(name = "root", category = "Core", printObject = true)
>     public static class RootLogger extends LoggerConfig {
> 
> +        private static final long serialVersionUID = 1L;
> +
>         @PluginFactory
>         public static LoggerConfig createLogger(
>                 @PluginAttribute("additivity") final String additivity,
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/NullConfiguration.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/NullConfiguration.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/NullConfiguration.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/NullConfiguration.java
Mon Aug 25 21:22:25 2014
> @@ -23,6 +23,7 @@ import org.apache.logging.log4j.Level;
>  */
> public class NullConfiguration extends AbstractConfiguration {
> 
> +    private static final long serialVersionUID = 1L;
>     public static final String NULL_NAME = "Null";
> 
>     public NullConfiguration() {
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java
Mon Aug 25 21:22:25 2014
> @@ -47,6 +47,7 @@ import com.fasterxml.jackson.databind.Ob
>  */
> public class JsonConfiguration extends AbstractConfiguration implements Reconfigurable
{
> 
> +    private static final long serialVersionUID = 1L;
>     private static final String[] VERBOSE_CLASSES = new String[] { ResolverUtil.class.getName()
};
>     private final List<Status> status = new ArrayList<Status>();
>     private JsonNode root;
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
Mon Aug 25 21:22:25 2014
> @@ -62,6 +62,8 @@ import org.xml.sax.SAXException;
>  */
> public class XmlConfiguration extends AbstractConfiguration implements Reconfigurable
{
> 
> +    private static final long serialVersionUID = 1L;
> +
>     private static final String XINCLUDE_FIXUP_LANGUAGE = "http://apache.org/xml/features/xinclude/fixup-language";
>     private static final String XINCLUDE_FIXUP_BASE_URIS = "http://apache.org/xml/features/xinclude/fixup-base-uris";
>     private static final String[] VERBOSE_CLASSES = new String[] { ResolverUtil.class.getName()
};
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/yaml/YamlConfiguration.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/yaml/YamlConfiguration.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/yaml/YamlConfiguration.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/yaml/YamlConfiguration.java
Mon Aug 25 21:22:25 2014
> @@ -25,6 +25,8 @@ import com.fasterxml.jackson.dataformat.
> 
> public class YamlConfiguration extends JsonConfiguration {
> 
> +    private static final long serialVersionUID = 1L;
> +
>     public YamlConfiguration(final ConfigurationSource configSource) {
>         super(configSource);
>     }
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/StructuredDataFilter.java
Mon Aug 25 21:22:25 2014
> @@ -39,6 +39,8 @@ import org.apache.logging.log4j.message.
> @Plugin(name = "StructuredDataFilter", category = "Core", elementType = "filter", printObject
= true)
> public final class StructuredDataFilter extends MapFilter {
> 
> +    private static final long serialVersionUID = 1L;
> +
>     private StructuredDataFilter(final Map<String, List<String>> map, final
boolean oper, final Result onMatch,
>                                  final Result onMismatch) {
>         super(map, oper, onMatch, onMismatch);
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java?rev=1620456&r1=1620455&r2=1620456&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java
(original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java
Mon Aug 25 21:22:25 2014
> @@ -40,6 +40,8 @@ import org.apache.logging.log4j.message.
> @Plugin(name = "ThreadContextMapFilter", category = "Core", elementType = "filter", printObject
= true)
> public class ThreadContextMapFilter extends MapFilter {
> 
> +    private static final long serialVersionUID = 1L;
> +
>     private final String key;
>     private final String value;
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message