FileDocCategorySizeDatePackage
Logger.javaAPI DocGlassfish v2 API15995Sat May 05 19:17:28 BST 2007org.apache.taglibs.standard.lang.jstl

Logger

public class Logger extends Object

The evaluator may pass an instance of this class to operators and expressions during evaluation. They should use this to log any warning or error messages that might come up. This allows all of our logging policies to be concentrated in one class.

Errors are conditions that are severe enough to abort operation. Warnings are conditions through which the operation may continue, but which should be reported to the developer.

author
Nathan Abramson - Art Technology Group
version
$Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: tcfujii $

Fields Summary
PrintStream
mOut
Constructors Summary
public Logger(PrintStream pOut)
Constructor

param
pOut the PrintStream to which warnings should be printed

    mOut = pOut;
  
Methods Summary
public booleanisLoggingError()
Returns true if the application should even bother to try logging an error.

    return true;
  
public booleanisLoggingWarning()
Returns true if the application should even bother to try logging a warning.

    return false;
  
public voidlogError(java.lang.String pMessage, java.lang.Throwable pRootCause)
Logs an error

    if (isLoggingError ()) {
      if (pMessage == null) {
	throw new ELException (pRootCause);
      }
      else if (pRootCause == null) {
	throw new ELException (pMessage);
      }
      else {
	throw new ELException (pMessage, pRootCause);
      }
    }
  
public voidlogError(java.lang.String pTemplate)
Logs an error

    if (isLoggingError ()) {
      logError (pTemplate, null);
    }
  
public voidlogError(java.lang.Throwable pRootCause)
Logs an error

    if (isLoggingError ()) {
      logError (null, pRootCause);
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Object pArg0)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	  }));
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	  }),
	 pRootCause);
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	  }));
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	  }),
	 pRootCause);
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	  }));
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	  }),
	 pRootCause);
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	  }));
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	  }),
	 pRootCause);
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	  }));
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	  }),
	 pRootCause);
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4, java.lang.Object pArg5)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	    "" + pArg5,
	  }));
    }
  
public voidlogError(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4, java.lang.Object pArg5)
Logs an error

    if (isLoggingError ()) {
      logError
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	    "" + pArg5,
	  }),
	 pRootCause);
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	  }));
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	  }),
	 pRootCause);
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	  }));
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	  }),
	 pRootCause);
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	  }));
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	  }),
	 pRootCause);
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4, java.lang.Object pArg5)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	    "" + pArg5,
	  }));
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4, java.lang.Object pArg5)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	    "" + pArg2,
	    "" + pArg3,
	    "" + pArg4,
	    "" + pArg5,
	  }),
	 pRootCause);
    }
  
public voidlogWarning(java.lang.String pMessage, java.lang.Throwable pRootCause)
Logs a warning

    if (isLoggingWarning ()) {
      if (pMessage == null) {
	System.out.println (pRootCause);
      }
      else if (pRootCause == null) {
	System.out.println (pMessage);
      }
      else {
	System.out.println (pMessage + ": " + pRootCause);
      }
    }
  
public voidlogWarning(java.lang.String pTemplate)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning (pTemplate, null);
    }
  
public voidlogWarning(java.lang.Throwable pRootCause)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning (null, pRootCause);
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Object pArg0)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	  }));
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	  }),
	 pRootCause);
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Object pArg0, java.lang.Object pArg1)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	  }));
    }
  
public voidlogWarning(java.lang.String pTemplate, java.lang.Throwable pRootCause, java.lang.Object pArg0, java.lang.Object pArg1)
Logs a warning

    if (isLoggingWarning ()) {
      logWarning
	(MessageFormat.format
	 (pTemplate,
	  new Object [] {
	    "" + pArg0,
	    "" + pArg1,
	  }),
	 pRootCause);
    }