com.paulwithers.openLog
Class OpenLogUtil

java.lang.Object
  extended by com.paulwithers.openLog.OpenLogUtil

public class OpenLogUtil
extends java.lang.Object

Since:
6.0.0 Utility class to allow access without OpenLogItem needing to have static methods
Author:
Paul Withers

Field Summary
private static OpenLogItem oli_
           
 
Constructor Summary
OpenLogUtil()
           
 
Method Summary
(package private) static void debugPrint(java.lang.Throwable ee)
           
static java.lang.String getIniVar(java.lang.String propertyName, java.lang.String defaultValue)
          Get a notes.ini variable value or use default value passed.
static OpenLogItem getOpenLogItem()
          Helper method to give easy access to the OpenLogItem
(package private) static java.lang.String getXspProperty(java.lang.String propertyName, java.lang.String defaultValue)
          Gets a proeprty value from xsp.properties either in NSF or on server.
static void logError(Session s, java.lang.Throwable ee)
          Logs an error / throwable for a specific Session
static void logError(Session s, java.lang.Throwable ee, java.lang.String msg, java.util.logging.Level severityType, Document doc)
          Logs an error / throwable for a specific Session at a specific severity for a specific document
static java.lang.String logError(java.lang.Throwable ee)
          Logs an error / throwable
static java.lang.String logErrorEx(java.lang.Throwable ee, java.lang.String msg, java.util.logging.Level severityType, Document doc)
          Logs an error / throwable at a specific severity for a specific document
static void logEvent(Session s, java.lang.Throwable ee, java.lang.String msg, java.util.logging.Level severityType, Document doc)
          Logs an event for a specific Session at a specific severity for a specific document
static java.lang.String logEvent(java.lang.Throwable ee, java.lang.String msg, java.util.logging.Level severityType, Document doc)
          Logs an event at a specific severity for a specific document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oli_

private static transient OpenLogItem oli_
Constructor Detail

OpenLogUtil

public OpenLogUtil()
Method Detail

getOpenLogItem

public static OpenLogItem getOpenLogItem()
Helper method to give easy access to the OpenLogItem

Returns:
OpenLogItem
Since:
6.0.0

logError

public static java.lang.String logError(java.lang.Throwable ee)
Logs an error / throwable

Parameters:
ee - Throwable holding the error
Returns:
String error message logged
Since:
6.0.0

logError

public static void logError(Session s,
                            java.lang.Throwable ee)
Logs an error / throwable for a specific Session

Parameters:
s - Session to log the eror for
ee - Throwable holding the error
Since:
6.0.0

logError

public static void logError(Session s,
                            java.lang.Throwable ee,
                            java.lang.String msg,
                            java.util.logging.Level severityType,
                            Document doc)
Logs an error / throwable for a specific Session at a specific severity for a specific document

Parameters:
s - Session to log the eror for
ee - Throwable holding the error
msg - String message to log
severityType - Level to log at
doc - Document to log the error for or null
Since:
6.0.0

logErrorEx

public static java.lang.String logErrorEx(java.lang.Throwable ee,
                                          java.lang.String msg,
                                          java.util.logging.Level severityType,
                                          Document doc)
Logs an error / throwable at a specific severity for a specific document

Parameters:
ee - Throwable holding the error
msg - String message to log
severityType - Level to log at
doc - Document to log the error for or null
Returns:
String error message logged
Since:
6.0.0

logEvent

public static void logEvent(Session s,
                            java.lang.Throwable ee,
                            java.lang.String msg,
                            java.util.logging.Level severityType,
                            Document doc)
Logs an event for a specific Session at a specific severity for a specific document

Parameters:
s - Session to log the event for
ee - Throwable - use new Throwable()
msg - String message to log
severityType - Level to log at
doc - Document to log the event for or null
Since:
6.0.0

logEvent

public static java.lang.String logEvent(java.lang.Throwable ee,
                                        java.lang.String msg,
                                        java.util.logging.Level severityType,
                                        Document doc)
Logs an event at a specific severity for a specific document

Parameters:
ee - Throwable - use new Throwable()
msg - String message to log
severityType - Level to log at
doc - Document to log the event for or null
Since:
6.0.0

debugPrint

static void debugPrint(java.lang.Throwable ee)

getIniVar

public static java.lang.String getIniVar(java.lang.String propertyName,
                                         java.lang.String defaultValue)
Get a notes.ini variable value or use default value passed. Moved from OpenLogItem in 6.0.0

Parameters:
propertyName - String property to retrieve from notes.ini
defaultValue - String default if no notes.ini setting declared
Returns:
String notes.ini variable value or default
Since:
6.0.0

getXspProperty

static java.lang.String getXspProperty(java.lang.String propertyName,
                                       java.lang.String defaultValue)
Gets a proeprty value from xsp.properties either in NSF or on server. If it's not found, it falls back to looking to notes.ini variable. Moved from OpenLogItem in 6.0.0

Parameters:
propertyName - String property to retrieve from notes.ini
defaultValue - String default if no notes.ini setting declared
Returns:
String xsp.property valuenotes.ini variable value or default
Since:
6.0.0