⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 servletcontextlog.java

📁 Java游戏高级编程!!很不错的!!!Java游戏高级编程!!很不错的
💻 JAVA
字号:
     package com.croftsoft.core.util.log;

     import javax.servlet.Servlet;
     import javax.servlet.ServletContext;

     import com.croftsoft.core.lang.NullArgumentException;

     /*********************************************************************
     * Delegates logging to a ServletContext.
     *
     * @author
     *   <A HREF="http://www.alumni.caltech.edu/~croft/">David W. Croft</A>
     * @version
     *   2001-02-27
     *********************************************************************/

     public final class  ServletContextLog implements Log
     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////
     {

     private final ServletContext  servletContext;

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////

     public  ServletContextLog ( ServletContext  servletContext )
     //////////////////////////////////////////////////////////////////////
     {
       NullArgumentException.check (
         this.servletContext = servletContext );
     }

     public  ServletContextLog ( Servlet  servlet )
     //////////////////////////////////////////////////////////////////////
     {
       this ( servlet.getServletConfig ( ).getServletContext ( ) );
     }

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////

     public void  record ( String  message )
     //////////////////////////////////////////////////////////////////////
     {
       servletContext.log ( message );
     }

     public void  record ( Throwable  throwable )
     //////////////////////////////////////////////////////////////////////
     {
       servletContext.log ( throwable.getMessage ( ), throwable );
     }


     public void  record ( String  message, Throwable  throwable )
     //////////////////////////////////////////////////////////////////////
     {
       servletContext.log ( message, throwable );
     }

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////
     }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -