Java EE Servlet/JSP tutorial : Adding an error page, logging, and other forms of debugging

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
  
  
Logging in Resin
 
 
http://www.caucho.com/resin-4.0/admin/logging.xtp
 
 
 
http://www.caucho.com/resin-4.0/admin/resin-admin-command-line.xtp#loglevelsettingloglevel
 
  
 
Background information on logging
 
Background information on logging
Line 21: Line 15:
  
 
http://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html
 
http://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html
 +
 +
Common problem with logging
 +
 +
http://stackoverflow.com/questions/6315699/why-are-my-level-fine-logging-messages-not-showing
 +
  
  
Line 32: Line 31:
  
 
http://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html#format(java.util.logging.LogRecord)
 
http://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html#format(java.util.logging.LogRecord)
 +
 +
 +
==Resin and logging==
 +
 +
Logging in Resin
 +
 +
http://www.caucho.com/resin-4.0/admin/logging.xtp
 +
 +
 +
http://www.caucho.com/resin-4.0/admin/resin-admin-command-line.xtp#loglevelsettingloglevel
 +
  
  
Line 63: Line 73:
 
# app-0.log_level : finest
 
# app-0.log_level : finest
 
</pre>
 
</pre>
 
Common problem with logging
 
 
http://stackoverflow.com/questions/6315699/why-are-my-level-fine-logging-messages-not-showing
 

Revision as of 00:00, 9 May 2012

In progress....


Contents

Background on logging

Background information on logging

http://www.vogella.com/articles/Logging/article.html

http://onjava.com/onjava/2002/06/19/log.html

http://tutorials.jenkov.com/java-logging/index.html

http://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html

Common problem with logging

http://stackoverflow.com/questions/6315699/why-are-my-level-fine-logging-messages-not-showing


Understandng the outptut for logging

http://docs.oracle.com/javase/7/docs/technotes/guides/logging/index.html

http://docs.oracle.com/javase/7/docs/technotes/guides/logging/overview.html

http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax

http://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html#format(java.util.logging.LogRecord)


Resin and logging

Logging in Resin

http://www.caucho.com/resin-4.0/admin/logging.xtp


http://www.caucho.com/resin-4.0/admin/resin-admin-command-line.xtp#loglevelsettingloglevel


Changing log levels in Resin:

~/workspace/javaee/Servers/Resin 4.0 at localhost-config/resin.xml

...
  <!-- Logging configuration for the JDK logging API -->
  <log-handler name="" level="all" path="stdout:"
               timestamp="[%y-%m-%d %H:%M:%S.%s]"
               format=" {${thread}} ${log.message}"/>

...

  <!--
     - level='info' for production
     - 'fine' or 'finer' for development and troubleshooting
    -->
  <logger name="" level="${log_level?:'info'}"/>

  <logger name="com.caucho.java" level="config"/>
  <logger name="com.caucho.loader" level="config"/>


Changing log levels in Resin:

~/workspace/javaee/Servers/Resin 4.0 at localhost-config/resin.properties

# log_level : info
# app-0.log_level : finest
Personal tools
TOOLBOX
LANGUAGES