@@ -0,0 +1,2527 @@
+/* %0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A * %0A *     http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0A%0Apackage java.util.logging;%0A%0Aimport java.io.PrintWriter;%0Aimport java.io.StringWriter;%0Aimport java.text.MessageFormat;%0Aimport java.util.Date;%0A%0A/**%0A * %3Ccode%3ESimpleFormatter%3C/code%3E can be used to print a summary of the%0A * information contained in a %3Ccode%3ELogRecord%3C/code%3E object in a human%0A * readable format.%0A * %0A */%0Apublic class SimpleFormatter extends Formatter %7B%0A    /**%0A     * Constructs a %3Ccode%3ESimpleFormatter%3C/code%3E object.%0A     */%0A    public SimpleFormatter() %7B%0A        super();%0A    %7D%0A%0A    @Override%0A    public String format(LogRecord r) %7B%0A        StringBuilder sb = new StringBuilder();%0A        sb.append(MessageFormat.format(%22%7B0, date%7D %7B0, time%7D %22, //$NON-NLS-1$%0A                new Object%5B%5D %7B new Date(r.getMillis()) %7D));%0A        sb.append(r.getSourceClassName()).append(%22 %22); //$NON-NLS-1$%0A        sb.append(r.getSourceMethodName()).append(LogManager.getSystemLineSeparator()); //$NON-NLS-1$%0A        sb.append(r.getLevel().getName()).append(%22: %22); //$NON-NLS-1$%0A        sb.append(formatMessage(r)).append(LogManager.getSystemLineSeparator());%0A        if (null != r.getThrown()) %7B%0A            sb.append(%22Throwable occurred: %22); //$NON-NLS-1$%0A            Throwable t = r.getThrown();%0A            PrintWriter pw = null;%0A            try %7B%0A                StringWriter sw = new StringWriter();%0A                pw = new PrintWriter(sw);%0A                t.printStackTrace(pw);%0A                sb.append(sw.toString());%0A            %7D finally %7B%0A                if(pw != null)%7B%0A                    try %7B%0A                        pw.close();%0A                    %7D catch (Exception e) %7B%0A                        // ignore%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A        return sb.toString();%0A    %7D%0A%7D%0A%0A

Apply patch HARMONY-2414 ([classlib][logging]Compatibility: message format of java.util.logging.Logger.log() on Harmony diffes from RI message)