directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r809149 - in /directory/shared/branches/shared-schema/ldap-schema/src: main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/ test/ test/java/ test/java/org/ test/java/org/apache/ test/java/org/apache/directory/ test/java/org/apa...
Date Sat, 29 Aug 2009 15:49:02 GMT
Author: akarasulu
Date: Sat Aug 29 15:49:02 2009
New Revision: 809149

URL: http://svn.apache.org/viewvc?rev=809149&view=rev
Log:
adding ldif extracting code to ldap-schema module

Added:
    directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/ResourceMap.java
    directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractor.java
    directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/UniqueResourceException.java
    directory/shared/branches/shared-schema/ldap-schema/src/test/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/
    directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java
    directory/shared/branches/shared-schema/ldap-schema/src/test/resources/
    directory/shared/branches/shared-schema/ldap-schema/src/test/resources/log4j.properties

Added: directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/ResourceMap.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/ResourceMap.java?rev=809149&view=auto
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/ResourceMap.java
(added)
+++ directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/ResourceMap.java
Sat Aug 29 15:49:02 2009
@@ -0,0 +1,146 @@
+/*
+ *   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.directory.shared.ldap.schema.ldif.extractor;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Pattern;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
+
+
+/**
+ * Lists LDIF resources available from the classpath.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ResourceMap
+{
+   /**
+    * For all elements of java.class.path get a Map of resources
+    * Pattern pattern = Pattern.compile(".*").  The keys represent
+    * resource names and the boolean parameter indicates whether or
+    * not the resource is in a Jar file.
+    * 
+    * @param pattern the pattern to match
+    * @return the resources with markers - true if resource is in Jar
+    */
+    public static Map<String,Boolean> getResources( Pattern pattern )
+    {
+        HashMap<String,Boolean> retval = new HashMap<String,Boolean>();
+        String classPath = System.getProperty( "java.class.path", "." );
+        String[] classPathElements = classPath.split( ":" );
+        for ( String element : classPathElements )
+        {
+            getResources( retval, element, pattern );
+        }
+        return retval;
+    }
+
+
+    private static void getResources( HashMap<String,Boolean> map, 
+        String element, Pattern pattern )
+    {
+        File file = new File( element );
+        if ( file.isDirectory() )
+        {
+            getResourcesFromDirectory( map, file, pattern );
+        }
+        else
+        {
+            getResourcesFromJarFile( map, file, pattern );
+        }
+    }
+
+
+    private static void getResourcesFromJarFile( HashMap<String,Boolean> map, 
+        File file, Pattern pattern )
+    {
+        ZipFile zf;
+        try
+        {
+            zf = new ZipFile( file );
+        }
+        catch ( ZipException e )
+        {
+            throw new Error( e );
+        }
+        catch ( IOException e )
+        {
+            throw new Error( e );
+        }
+        
+        Enumeration<? extends ZipEntry> e = zf.entries();
+        while ( e.hasMoreElements() )
+        {
+            ZipEntry ze = e.nextElement();
+            String fileName = ze.getName();
+            boolean accept = pattern.matcher( fileName ).matches();
+            if ( accept )
+            {
+                map.put( fileName, Boolean.TRUE );
+            }
+        }
+        try
+        {
+            zf.close();
+        }
+        catch ( IOException e1 )
+        {
+            throw new Error( e1 );
+        }
+    }
+
+
+    private static void getResourcesFromDirectory( 
+        HashMap<String,Boolean> map, File directory, Pattern pattern )
+    {
+        File[] fileList = directory.listFiles();
+        for ( File file : fileList )
+        {
+            if ( file.isDirectory() )
+            {
+                getResourcesFromDirectory( map, file, pattern );
+            }
+            else
+            {
+                try
+                {
+                    String fileName = file.getCanonicalPath();
+                    boolean accept = pattern.matcher( fileName ).matches();
+                    if ( accept )
+                    {
+                        map.put( fileName, Boolean.FALSE );
+                    }
+                }
+                catch ( IOException e )
+                {
+                    throw new Error( e );
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

Added: directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractor.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractor.java?rev=809149&view=auto
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractor.java
(added)
+++ directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractor.java
Sat Aug 29 15:49:02 2009
@@ -0,0 +1,287 @@
+/*
+ *  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.directory.shared.ldap.schema.ldif.extractor;
+
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.Stack;
+import java.util.Map.Entry;
+import java.util.regex.Pattern;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Extracts LDIF files for the schema repository onto a destination directory.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 664295 $
+ */
+public class SchemaLdifExtractor
+{
+    private static final String BASE_PATH = "";
+//    private static final String BASE_PATH = SchemaLdifExtractor.class.getName()
+//    .substring( 0, SchemaLdifExtractor.class.getName().lastIndexOf( "." ) + 1 )
+//    .replace( '.', '/' );
+
+    private static final Logger LOG = LoggerFactory.getLogger( SchemaLdifExtractor.class
);
+    
+    private File outputDirectory;
+
+
+    public SchemaLdifExtractor( File outputDirectory ) throws IOException
+    {
+        LOG.debug( "BASE_PATH set to {}, outputDirectory set to {}", 
+            BASE_PATH, outputDirectory );
+        this.outputDirectory = outputDirectory;
+    }
+
+    
+    /**
+     * Extracts the LDIF files from a Jar file or copies exploded LDIF resources.
+     *
+     * @throws IOException on IO errors
+     */
+    public void extractOrCopy() throws IOException
+    {
+        if ( ! outputDirectory.exists() )
+        {
+            outputDirectory.mkdirs();
+        }
+
+        File schemaDirectory = new File( outputDirectory, "schema" );
+        if ( ! schemaDirectory.exists() )
+        {
+            schemaDirectory.mkdirs();
+        }
+
+        Pattern pattern = Pattern.compile( ".*schema/schema.*\\.ldif" );
+        Map<String,Boolean> list = ResourceMap.getResources( pattern );
+        
+        for ( Entry<String,Boolean> entry : list.entrySet() )
+        {
+            if ( entry.getValue() )
+            {
+                extractFromJar( entry.getKey() );
+            }
+            else
+            {
+                File resource = new File( entry.getKey() );
+                copyFile( resource, getDestinationFile( resource ) );
+            }
+        }
+    }
+    
+    
+    /**
+     * Copies a file line by line from the source file argument to the 
+     * destination file argument.
+     *
+     * @param source the source file to copy
+     * @param destination the destination to copy the source to
+     * @throws IOException if there are IO errors or the source does not exist
+     */
+    private void copyFile( File source, File destination ) throws IOException
+    {
+        LOG.debug( "copyFile(): source = {}, destination = {}", source, destination );
+        
+        if ( ! destination.getParentFile().exists() )
+        {
+            destination.getParentFile().mkdirs();
+        }
+        
+        if ( ! source.getParentFile().exists() )
+        {
+            throw new FileNotFoundException( "Cannot copy non-existant " +
+            		"source file " + source.getAbsolutePath() );
+        }
+        
+        FileWriter out = new FileWriter( destination );
+        BufferedReader in = new BufferedReader( new FileReader( source ) );
+        String line = null;
+        while ( null != ( line = in.readLine() ) )
+        {
+            out.write( line );
+        }
+        
+        in.close();
+        out.flush();
+        out.close();
+    }
+
+    
+    /**
+     * Assembles the destination file by appending file components previously
+     * pushed on the fileComponentStack argument.
+     *
+     * @param fileComponentStack stack containing pushed file components
+     * @return the assembled destination file
+     */
+    private File assembleDestinationFile( Stack<String> fileComponentStack )
+    {
+        File destinationFile = outputDirectory.getAbsoluteFile();
+        
+        while ( ! fileComponentStack.isEmpty() )
+        {
+            destinationFile = new File( destinationFile, fileComponentStack.pop() );
+        }
+        
+        return destinationFile;
+    }
+    
+    
+    /**
+     * Calculates the destination file.
+     *
+     * @param resource the source file
+     * @return the destination file's parent directory
+     */
+    private File getDestinationFile( File resource )
+    {
+        File parent = resource.getParentFile();
+        Stack<String> fileComponentStack = new Stack<String>();
+        fileComponentStack.push( resource.getName() );
+        
+        while ( parent != null )
+        {
+            fileComponentStack.push( parent.getName() );
+            
+            if ( parent.getName().equals( "schema" ) )
+            {
+                // All LDIF files besides the schema.ldif are under the 
+                // schema/schema base path. So we need to add one more 
+                // schema component to all LDIF files minus this schema.ldif
+                if ( ! resource.getName().equals( "schema.ldif" ) )
+                {
+                    fileComponentStack.push( "schema" );
+                }
+                
+                return assembleDestinationFile( fileComponentStack );
+            }
+            
+            if ( parent.equals( parent.getParentFile() ) 
+                || parent.getParentFile() == null )
+            {
+                throw new IllegalStateException( 
+                    "Should not be hitting root without schema/schema pattern." );
+            }
+            
+            parent = parent.getParentFile();
+        }
+        
+        if ( parent != null )
+        {
+            return assembleDestinationFile( fileComponentStack );
+        }
+        else
+        {
+            throw new IllegalStateException( "parent cannot be null" );
+        }
+    }
+    
+    
+    /**
+     * Gets the DBFILE resource from within a jar off the base path.  If another jar
+     * with such a DBFILE resource exists then an error will result since the resource
+     * is not unique across all the jars.
+     *
+     * @param resourceName the file name of the resource to load
+     * @param resourceDescription
+     * @return the InputStream to read the contents of the resource
+     * @throws IOException if there are problems reading or finding a unique copy of the
resource
+     */                                                                                 
              
+    public static InputStream getUniqueResourceAsStream( String resourceName, String resourceDescription
) throws IOException
+    {
+        resourceName = BASE_PATH + resourceName;
+        URL result = getUniqueResource( resourceName, resourceDescription );
+        return result.openStream();
+    }
+
+
+    /**
+     * Gets a unique resource from a Jar file.
+     * 
+     * @param resourceName the name of the resource
+     * @param resourceDescription the description of the resource
+     * @return the URL to the resource in the Jar file
+     * @throws IOException if there is an IO error
+     */
+    static URL getUniqueResource( String resourceName, String resourceDescription )
+            throws IOException
+    {
+        Enumeration<URL> resources = SchemaLdifExtractor.class.getClassLoader().getResources(
resourceName );
+        if ( !resources.hasMoreElements() )
+        {
+            throw new UniqueResourceException( resourceName, resourceDescription );
+        }
+        URL result = resources.nextElement();
+        if ( resources.hasMoreElements() )
+        {
+            throw new UniqueResourceException( resourceName, result, resources, resourceDescription);
+        }
+        return result;
+    }
+    
+
+    /**
+     * Extracts the LDIF schema resource from a Jar.
+     *
+     * @param resource the LDIF schema resource
+     * @throws IOException if there are IO errors
+     */
+    private void extractFromJar( String resource ) throws IOException
+    {
+        byte[] buf = new byte[512];
+        InputStream in = SchemaLdifExtractor.getUniqueResourceAsStream( resource, 
+            "LDIF file in schema repository" );
+
+        try
+        {
+            FileOutputStream out = new FileOutputStream( new File( outputDirectory, resource
) );
+            try
+            {
+                while ( in.available() > 0 )
+                {
+                    int readCount = in.read( buf );
+                    out.write( buf, 0, readCount );
+                }
+                out.flush();
+            } finally
+            {
+                out.close();
+            }
+        }
+        finally
+        {
+            in.close();
+        }
+    }
+}

Added: directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/UniqueResourceException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/UniqueResourceException.java?rev=809149&view=auto
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/UniqueResourceException.java
(added)
+++ directory/shared/branches/shared-schema/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/UniqueResourceException.java
Sat Aug 29 15:49:02 2009
@@ -0,0 +1,106 @@
+/*
+ * 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.directory.shared.ldap.schema.ldif.extractor;
+
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+
+
+/**
+ * Exception for when we detect more than one unqiue schema LDIF file resource
+ * on the classpath.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 664295 $ $Date: 2008-06-07 10:48:16 +0300 (Sat, 07 Jun 2008) $
+ */
+public class UniqueResourceException extends RuntimeException
+{
+    private static final long serialVersionUID = 1L;
+
+    private final String resourceName;
+    private final List<URL> urls;
+    private final String resourceDescription;
+
+    
+    public UniqueResourceException( String resourceName, String resourceDescription )
+    {
+        this( resourceName, null, resourceDescription );
+    }
+
+    
+    public UniqueResourceException( String resourceName, List<URL> urls, String resourceDescription
)
+    {
+        this.resourceName = resourceName;
+        this.urls = urls;
+        this.resourceDescription = resourceDescription;
+    }
+
+    
+    public UniqueResourceException( String resourceName, URL first, Enumeration<URL>
urlEnum, String resourceDescription )
+    {
+        this( resourceName, toList( first, urlEnum ), resourceDescription );
+    }
+
+    
+    private static List<URL> toList( URL first, Enumeration<URL> urlEnum )
+    {
+        ArrayList<URL> urls = new ArrayList<URL>();
+        urls.add( first );
+        while( urlEnum.hasMoreElements() )
+        {
+            urls.add( urlEnum.nextElement() );
+        }
+        return urls;
+    }
+
+    
+    public String getMessage()
+    {
+        StringBuffer buf = new StringBuffer( "Problem locating " ).append( resourceDescription
).append( "\n" );
+        if ( urls == null )
+        {
+            buf.append( "No resources named '" ).append( resourceName ).append( "' located
on classpath" );
+        } else
+        {
+            buf.append( "Multiple copies of resource named '" ).append( resourceName ).append(
+                    "' located on classpath at urls" );
+            for ( URL url : urls )
+            {
+                buf.append( "\n    " ).append( url );
+            }
+        }
+        return buf.toString();
+    }
+
+
+    public String getResourceName()
+    {
+        return resourceName;
+    }
+
+    
+    public List<URL> getUrls()
+    {
+        return Collections.unmodifiableList( urls );
+    }
+}

Added: directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java?rev=809149&view=auto
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java
(added)
+++ directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java
Sat Aug 29 15:49:02 2009
@@ -0,0 +1,42 @@
+/*
+ *   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.directory.shared.ldap.schema.ldif.extractor;
+
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests the SchemaLdifExtractor class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SchemaLdifExtractorTest extends TestCase
+{
+    public void testExtract() throws Exception
+    {
+        SchemaLdifExtractor extractor = new SchemaLdifExtractor( 
+            new File( "/Users/akarasulu" ) );
+        extractor.extractOrCopy();
+    }
+}

Added: directory/shared/branches/shared-schema/ldap-schema/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema/src/test/resources/log4j.properties?rev=809149&view=auto
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema/src/test/resources/log4j.properties
(added)
+++ directory/shared/branches/shared-schema/ldap-schema/src/test/resources/log4j.properties
Sat Aug 29 15:49:02 2009
@@ -0,0 +1,22 @@
+#############################################################################
+#    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.
+#############################################################################
+log4j.rootCategory=DEBUG, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
+



Mime
View raw message