ceki 01/07/20 10:12:01 Modified: src/java/org/apache/log4j ConsoleAppender.java PatternLayout.java SimpleLayout.java TTCCLayout.java src/java/org/apache/log4j/config PropertySetter.java Log: - Corrected a renegade comment in ConsoleAppedner. - Removed deprecated methods in some Layouts. - Slightly changed a warning message reported by PropertySetter.java Revision Changes Path 1.11 +1 -1 jakarta-log4j/src/java/org/apache/log4j/ConsoleAppender.java Index: ConsoleAppender.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/ConsoleAppender.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ConsoleAppender.java 2001/07/20 16:57:15 1.10 +++ ConsoleAppender.java 2001/07/20 17:12:01 1.11 @@ -50,7 +50,7 @@ /** Sets the value of the <b>Target</b> option. Recognized values are "System.out" and "System.err". Any other value will be ignored. - + */ public void setTarget(String value) { String v = value.trim(); 1.12 +1 -60 jakarta-log4j/src/java/org/apache/log4j/PatternLayout.java Index: PatternLayout.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/PatternLayout.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- PatternLayout.java 2001/05/20 13:21:56 1.11 +++ PatternLayout.java 2001/07/20 17:12:01 1.12 @@ -378,19 +378,6 @@ @since 0.8.2 */ public class PatternLayout extends Layout { - /** - A string constant used in naming the option for setting the - layout pattern. Current value of this string constant is - <b>ConversionPattern</b>. - - <p>Note that the search for all option keys is case sensitive. - - - @deprecated Options are now handled using the JavaBeans paradigm. - This constant is not longer needed and will be removed in the - <em>near</em> term. - */ - final static public String CONVERSION_PATTERN_OPTION = "ConversionPattern"; /** Default pattern string for log output. Currently set to the string <b>"%m%n"</b> which just prints the application supplied @@ -434,53 +421,7 @@ pattern).parse(); } - /** - Returns the array of option strings that {@link - PatternLayout} recognizes. The only recognized option string is - the value of {@link #CONVERSION_PATTERN_OPTION}. - - @deprecated We now use JavaBeans introspection to configure - components. Options strings are no longer needed. - */ - public - String[] getOptionStrings() { - return new String[] {CONVERSION_PATTERN_OPTION}; - } - - /** - The PatternLayout specific options are: - - <p> - <dl> - <dt><b>ConversionPattern</b> - - <p><dd>The value determines the conversion pattern used. - - </dl> - - @deprecated Use the setter method for the option directly instead - of the generic <code>setOption</code> method. - - */ - public - void setOption(String option, String value) { - if(value == null) - return; - if(option.equalsIgnoreCase(CONVERSION_PATTERN_OPTION)) { - pattern = value; - head = createPatternParser(value).parse(); - } - //else if(option.equals(TIMEZONE_OPTION)) { - //try { - //timezone = OptionConverter.substituteVars(value); - //} - //catch(IllegalArgumentException e) { - //LogLog.error("Could not substitute variables." , e); - //} - //} - } - - /** + /** Set the <b>ConversionPattern</b> option. This is the string which controls formatting and consists of a mix of literal content and conversion specifiers. 1.8 +0 -9 jakarta-log4j/src/java/org/apache/log4j/SimpleLayout.java Index: SimpleLayout.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/SimpleLayout.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- SimpleLayout.java 2001/04/07 11:31:57 1.7 +++ SimpleLayout.java 2001/07/20 17:12:01 1.8 @@ -28,15 +28,6 @@ } public - String[] getOptionStrings() { - return new String[0]; - } - - public - void setOption(String option, String value) { - } - - public void activateOptions() { } 1.9 +0 -49 jakarta-log4j/src/java/org/apache/log4j/TTCCLayout.java Index: TTCCLayout.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/TTCCLayout.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- TTCCLayout.java 2001/04/03 16:37:11 1.8 +++ TTCCLayout.java 2001/07/20 17:12:01 1.9 @@ -69,28 +69,6 @@ */ public class TTCCLayout extends DateLayout { - /** - @deprecated Options are now handled using the JavaBeans paradigm. - This constant is not longer needed and will be removed in the - <em>near</em> term. - */ - final static public String THREAD_PRINTING_OPTION = "ThreadPrinting"; - - /** - @deprecated Options are now handled using the JavaBeans paradigm. - This constant is not longer needed and will be removed in the - <em>near</em> term. - */ - final static public String CATEGORY_PREFIXING_OPTION = "CategoryPrefixing"; - - /** - @deprecated Options are now handled using the JavaBeans paradigm. - This constant is not longer needed and will be removed in the - <em>near</em> term. - */ - final static public String CONTEXT_PRINTING_OPTION = "ContextPrinting"; - - // Internal representation of options private boolean threadPrinting = true; private boolean categoryPrefixing = true; @@ -124,33 +102,6 @@ this.setDateFormat(dateFormatType); } - /** - @deprecated Use the setter method for the option directly instead - of the generic <code>setOption</code> method. - */ - public - String[] getOptionStrings() { - return OptionConverter.concatanateArrays(super.getOptionStrings(), - new String[] {THREAD_PRINTING_OPTION, CATEGORY_PREFIXING_OPTION, - CONTEXT_PRINTING_OPTION}); - - } - - /** - @deprecated Use the setter method for the option directly instead - of the generic <code>setOption</code> method. - */ - public - void setOption(String key, String value) { - super.setOption(key, value); - - if(key.equalsIgnoreCase(THREAD_PRINTING_OPTION)) - threadPrinting = OptionConverter.toBoolean(value, threadPrinting); - else if(key.equalsIgnoreCase(CATEGORY_PREFIXING_OPTION)) - categoryPrefixing = OptionConverter.toBoolean(value, categoryPrefixing); - else if(key.equalsIgnoreCase(CONTEXT_PRINTING_OPTION)) - contextPrinting = OptionConverter.toBoolean(value, contextPrinting); - } /** The <b>ThreadPrinting</b> option specifies whether the name of the 1.7 +3 -3 jakarta-log4j/src/java/org/apache/log4j/config/PropertySetter.java Index: PropertySetter.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/config/PropertySetter.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PropertySetter.java 2001/05/20 14:03:31 1.6 +++ PropertySetter.java 2001/07/20 17:12:01 1.7 @@ -154,8 +154,8 @@ try { setProperty(prop, name, value); } catch (PropertySetterException ex) { - LogLog.warn("Failed to set property " + name + - " to value \"" + value + "\". " + ex.getMessage()); + LogLog.warn("Failed to set property [" + name + + "] to value \"" + value + "\". " + ex.getMessage()); } } } @@ -173,7 +173,7 @@ throws PropertySetterException { Method setter = prop.getWriteMethod(); if (setter == null) { - throw new PropertySetterException("No setter for property"); + throw new PropertySetterException("No setter for property ["+name+"]."); } Class[] paramTypes = setter.getParameterTypes(); if (paramTypes.length != 1) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]