You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Morten Haraldsen (Created) (JIRA)" <ji...@apache.org> on 2011/12/19 08:58:30 UTC

[jira] [Created] (MTOMCAT-110) Support Slf4j bridge logger

Support Slf4j bridge logger
---------------------------

                 Key: MTOMCAT-110
                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
             Project: Apache Tomcat Maven Plugin
          Issue Type: New Feature
            Reporter: Morten Haraldsen


As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>

This should trigger something like:
java.util.logging.LogManager.getLogManager().reset();
SLF4JBridgeHandler.install();

(requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Issue Comment Edited] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173968#comment-13173968 ] 

Morten Haraldsen edited comment on MTOMCAT-110 at 12/21/11 9:35 AM:
--------------------------------------------------------------------

Hi again, I thought I should simplify your task a bit, and I wrote the following snippet:

private void installLogger(String loggerName) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException 
{
    if ("slf4j".equals(loggerName))
    {
        Class<?> clazz;
        try 
        {
            // Check class is available
            clazz = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler");
        
            // Remove all JUL handlers
            java.util.logging.LogManager.getLogManager().reset();
        
            // Install slf4j bridge handler
            final Method method = clazz.getMethod("install", String.class);
            method.invoke(null);
        } 
        catch (ClassNotFoundException e) 
        {
            // TODO: Notify that the class was missing
        }
    }
    else
    {
        // TODO: Notify unsupported logger type
    }
}
                
      was (Author: xaer):
    Hi again, I thought I should simplify your task a bit, and I wrote the following snippet:

{code}
private void installLogger(String loggerName) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException 
{
    	if ("slf4j".equals(loggerName))
    	{
    		Class<?> clazz;
        	try 
        	{
        		// Check class is available
				clazz = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler", false, getClass().getClassLoader());
				
				// Remove all JUL handlers
				java.util.logging.LogManager.getLogManager().reset();
				
				// Install slf4j bridge handler
				final Method method = clazz.getMethod("install", String.class);
        	    method.invoke(null);
		} 
        	catch (ClassNotFoundException e) 
        	{
				// TODO: Notify that the class was missing
		}
    	}
    	else
    	{
    		// TODO: Notify unsupported logger type
    	}
}
{code}
                  
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Issue Comment Edited] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173968#comment-13173968 ] 

Morten Haraldsen edited comment on MTOMCAT-110 at 12/21/11 9:27 AM:
--------------------------------------------------------------------

Hi again, I thought I should simplify your task a bit, and I wrote the following snippet:

{code}
private void installLogger(String loggerName) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException 
{
    	if ("slf4j".equals(loggerName))
    	{
    		Class<?> clazz;
        	try 
        	{
        		// Check class is available
				clazz = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler", false, getClass().getClassLoader());
				
				// Remove all JUL handlers
				java.util.logging.LogManager.getLogManager().reset();
				
				// Install slf4j bridge handler
				final Method method = clazz.getMethod("install", String.class);
        	    method.invoke(null);
		} 
        	catch (ClassNotFoundException e) 
        	{
				// TODO: Notify that the class was missing
		}
    	}
    	else
    	{
    		// TODO: Notify unsupported logger type
    	}
}
{code}
                
      was (Author: xaer):
    Hi again, I thought I should simplify your task a bit, and I wrote the following snippet:

private void installLogger(String loggerName) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException 
{
    	if ("slf4j".equals(loggerName))
    	{
    		Class<?> clazz;
        	try 
        	{
        		// Check class is available
				clazz = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler", false, getClass().getClassLoader());
				
				// Remove all JUL handlers
				java.util.logging.LogManager.getLogManager().reset();
				
				// Install slf4j bridge handler
				final Method method = clazz.getMethod("install", String.class);
        	    method.invoke(null);
		} 
        	catch (ClassNotFoundException e) 
        	{
				// TODO: Notify that the class was missing
		}
    	}
    	else
    	{
    		// TODO: Notify unsupported logger type
    	}
}
                  
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Olivier Lamy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174031#comment-13174031 ] 

Olivier Lamy commented on MTOMCAT-110:
--------------------------------------

lovely :-)
But from where parameter loggerName comes ? IMHO a cli option ?
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173968#comment-13173968 ] 

Morten Haraldsen commented on MTOMCAT-110:
------------------------------------------

Hi again, I thought I should simplify your task a bit, and I wrote the following snippet:

private void installLogger(String loggerName) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException 
{
    	if ("slf4j".equals(loggerName))
    	{
    		Class<?> clazz;
        	try 
        	{
        		// Check class is available
				clazz = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler", false, getClass().getClassLoader());
				
				// Remove all JUL handlers
				java.util.logging.LogManager.getLogManager().reset();
				
				// Install slf4j bridge handler
				final Method method = clazz.getMethod("install", String.class);
        	    method.invoke(null);
		} 
        	catch (ClassNotFoundException e) 
        	{
				// TODO: Notify that the class was missing
		}
    	}
    	else
    	{
    		// TODO: Notify unsupported logger type
    	}
}
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Olivier Lamy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172164#comment-13172164 ] 

Olivier Lamy commented on MTOMCAT-110:
--------------------------------------

I miss you here. 
Do you need that for tomcat*:run or for the exec war ? or for both ;-) ?
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172972#comment-13172972 ] 

Morten Haraldsen commented on MTOMCAT-110:
------------------------------------------

Yes, but I think you should probably have both a flag to enable it (as shown above), and you check for class availability. I completely agree that the dependency should not be added as a requirement. Thanks for you help!
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Issue Comment Edited] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174088#comment-13174088 ] 

Morten Haraldsen edited comment on MTOMCAT-110 at 12/21/11 1:28 PM:
--------------------------------------------------------------------

Yes, something like:
-logger slf4j

Edit: Btw, no reason to not move the clazz variable inside the try/catch like final Class<?> clazz = ...

PS: Could we have {code} tags turned on?
                
      was (Author: xaer):
    Yes, something like:
-logger slf4j
                  
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174238#comment-13174238 ] 

Hudson commented on MTOMCAT-110:
--------------------------------

Integrated in TomcatMavenPlugin #77 (See [https://builds.apache.org/job/TomcatMavenPlugin/77/])
    [MTOMCAT-110] Support Slf4j bridge logger.

olamy : http://svn.apache.org/viewvc/?view=rev&rev=1221816
Files : 
* /tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
* /tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java

                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>            Assignee: Olivier Lamy
>             Fix For: 2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Issue Comment Edited] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173968#comment-13173968 ] 

Morten Haraldsen edited comment on MTOMCAT-110 at 12/21/11 1:29 PM:
--------------------------------------------------------------------

Hi again, I thought I should simplify your task a bit, and I wrote the following snippet:

private void installLogger(String loggerName) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException 
{
    if ("slf4j".equals(loggerName))
    {
        
        try 
        {
            // Check class is available
            final Class<?> clazz = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler");
        
            // Remove all JUL handlers
            java.util.logging.LogManager.getLogManager().reset();
        
            // Install slf4j bridge handler
            final Method method = clazz.getMethod("install", null);
            method.invoke(null);
        } 
        catch (ClassNotFoundException e) 
        {
            // TODO: Notify that the class was missing
        }
    }
    else
    {
        // TODO: Notify unsupported logger type
    }
}
                
      was (Author: xaer):
    Hi again, I thought I should simplify your task a bit, and I wrote the following snippet:

private void installLogger(String loggerName) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException 
{
    if ("slf4j".equals(loggerName))
    {
        Class<?> clazz;
        try 
        {
            // Check class is available
            clazz = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler");
        
            // Remove all JUL handlers
            java.util.logging.LogManager.getLogManager().reset();
        
            // Install slf4j bridge handler
            final Method method = clazz.getMethod("install", String.class);
            method.invoke(null);
        } 
        catch (ClassNotFoundException e) 
        {
            // TODO: Notify that the class was missing
        }
    }
    else
    {
        // TODO: Notify unsupported logger type
    }
}
                  
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174088#comment-13174088 ] 

Morten Haraldsen commented on MTOMCAT-110:
------------------------------------------

Yes, something like:
-logger slf4j
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Olivier Lamy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172282#comment-13172282 ] 

Olivier Lamy commented on MTOMCAT-110:
--------------------------------------

I'm not in favor about adding such dependency by default for all users (some not use slf4j).
What I can do is to search if SLF4JBridgeHandler class is available (with a tccl.getClass() or Class.forName() ) and in such case install it.
Makes sense for you ?
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Morten Haraldsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172247#comment-13172247 ] 

Morten Haraldsen commented on MTOMCAT-110:
------------------------------------------

I use the plugin for building standalone tomcat applications, so exec-war-only goal is all that needs to be supported in my case. 

PS: I'm not that cute ;-)
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Closed] (MTOMCAT-110) Support Slf4j bridge logger

Posted by "Olivier Lamy (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MTOMCAT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MTOMCAT-110.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0
         Assignee: Olivier Lamy

committed.
please try last SNAPSHOT.
note you must add various slf4j files in extraDependencies section to have those included in root class loader.
                
> Support Slf4j bridge logger
> ---------------------------
>
>                 Key: MTOMCAT-110
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-110
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: New Feature
>            Reporter: Morten Haraldsen
>            Assignee: Olivier Lamy
>             Fix For: 2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> As a lot of web-applications use slf4j for logging, it would be nice if you could support this as a Mojo parameter, like <logging>slf4j</logging>
> This should trigger something like:
> java.util.logging.LogManager.getLogManager().reset();
> SLF4JBridgeHandler.install();
> (requires org.slf4j:jul-to-slf4j on the classpath)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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