com.hyper9.vangaea.server
Class Log

java.lang.Object
  extended by com.hyper9.vangaea.server.Log

public class Log
extends java.lang.Object

A logging utility class.

Author:
akutz

Constructor Summary
Log()
           
 
Method Summary
static void debug(java.lang.String message)
          Writes a log message.
static void debug(java.lang.String message, com.hyper9.common.beans.Bean bean)
          Writes a log message.
static void debug(java.lang.String message, com.hyper9.common.beans.Bean bean, java.lang.Throwable throwable)
          Writes a log message.
static void debug(java.lang.String message, java.lang.Throwable throwable)
          Writes a log message.
static void error(java.lang.String message)
          Writes a log message.
static void error(java.lang.String message, com.hyper9.common.beans.Bean bean)
          Writes a log message.
static void error(java.lang.String message, com.hyper9.common.beans.Bean bean, java.lang.Throwable throwable)
          Writes a log message.
static void error(java.lang.String message, java.lang.Throwable throwable)
          Writes a log message.
static org.apache.log4j.Level getLevel()
          Gets the current log level.
static void info(java.lang.String message)
          Writes a log message.
static void info(java.lang.String message, com.hyper9.common.beans.Bean bean)
          Writes a log message.
static void info(java.lang.String message, com.hyper9.common.beans.Bean bean, java.lang.Throwable throwable)
          Writes a log message.
static void info(java.lang.String message, java.lang.Throwable throwable)
          Writes a log message.
static void log(org.apache.log4j.Level level, com.hyper9.common.beans.Bean bean, java.lang.String message, java.lang.Throwable throwable)
          Logs a message.
static void log(org.apache.log4j.Level level, java.lang.String message)
          Writes a log message.
static void log(org.apache.log4j.Level level, java.lang.String message, com.hyper9.common.beans.Bean bean)
          Writes a log message.
static void log(org.apache.log4j.Level level, java.lang.String resourceName, java.lang.String clientAddress, java.lang.String clientUserName, java.lang.String transactionID, java.lang.String targetAddress, java.lang.String targetUserName, java.lang.String methodName, java.lang.String beanType, java.lang.String beanName, java.lang.String message, java.lang.Throwable throwable)
          Logs a message.
static void log(org.apache.log4j.Level level, java.lang.String message, java.lang.Throwable throwable)
          Writes a log message.
static void logOnLevel(java.lang.String message, java.lang.Exception e)
           
static void setConnectionInfo(com.hyper9.uvapi.types.ConnectionInformationBean toSet)
          Set the current connection information.
static void setResource(org.restlet.resource.ServerResource toSet)
          Set the current resource.
static void setTransactionID(java.lang.String toSet)
          Set the current transaction ID.
static void setUser(UserBean toSet)
          Set the current user.
static void warn(java.lang.String message)
          Writes a log message.
static void warn(java.lang.String message, com.hyper9.common.beans.Bean bean)
          Writes a log message.
static void warn(java.lang.String message, com.hyper9.common.beans.Bean bean, java.lang.Throwable throwable)
          Writes a log message.
static void warn(java.lang.String message, java.lang.Throwable throwable)
          Writes a log message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Method Detail

setUser

public static void setUser(UserBean toSet)
Set the current user.

Parameters:
toSet - The current user.

setResource

public static void setResource(org.restlet.resource.ServerResource toSet)
Set the current resource.

Parameters:
toSet - The current resource.

setTransactionID

public static void setTransactionID(java.lang.String toSet)
Set the current transaction ID.

Parameters:
toSet - The current transaction ID.

setConnectionInfo

public static void setConnectionInfo(com.hyper9.uvapi.types.ConnectionInformationBean toSet)
Set the current connection information.

Parameters:
toSet - The current connection information.

log

public static void log(org.apache.log4j.Level level,
                       com.hyper9.common.beans.Bean bean,
                       java.lang.String message,
                       java.lang.Throwable throwable)
Logs a message.

Parameters:
level - The log level.
bean - The bean to log (It's okay to pass a null value).
message - The message to log.
throwable - The throwable to log (It's okay to pass a null value).

log

public static void log(org.apache.log4j.Level level,
                       java.lang.String resourceName,
                       java.lang.String clientAddress,
                       java.lang.String clientUserName,
                       java.lang.String transactionID,
                       java.lang.String targetAddress,
                       java.lang.String targetUserName,
                       java.lang.String methodName,
                       java.lang.String beanType,
                       java.lang.String beanName,
                       java.lang.String message,
                       java.lang.Throwable throwable)
Logs a message.

Parameters:
level -
resourceName -
clientAddress -
clientUserName -
transactionID -
targetAddress -
targetUserName -
methodName -
beanType -
beanName -
message -
throwable -

getLevel

public static org.apache.log4j.Level getLevel()
Gets the current log level.

Returns:
The current log level.

log

public static void log(org.apache.log4j.Level level,
                       java.lang.String message)
Writes a log message.

Parameters:
level - The intended log level.
message - The message to log.

log

public static void log(org.apache.log4j.Level level,
                       java.lang.String message,
                       com.hyper9.common.beans.Bean bean)
Writes a log message.

Parameters:
level - The intended log level.
message - The message to log.
bean - The object that is the target of the log message.

log

public static void log(org.apache.log4j.Level level,
                       java.lang.String message,
                       java.lang.Throwable throwable)
Writes a log message.

Parameters:
level - The intended log level.
message - The message to log.
throwable - The exception being logged.

debug

public static void debug(java.lang.String message)
Writes a log message.

Parameters:
message - The message to log.

debug

public static void debug(java.lang.String message,
                         com.hyper9.common.beans.Bean bean)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.

debug

public static void debug(java.lang.String message,
                         java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
throwable - The exception being logged.

debug

public static void debug(java.lang.String message,
                         com.hyper9.common.beans.Bean bean,
                         java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.
throwable - The exception being logged.

info

public static void info(java.lang.String message)
Writes a log message.

Parameters:
message - The message to log.

info

public static void info(java.lang.String message,
                        com.hyper9.common.beans.Bean bean)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.

info

public static void info(java.lang.String message,
                        java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
throwable - The exception being logged.

info

public static void info(java.lang.String message,
                        com.hyper9.common.beans.Bean bean,
                        java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.
throwable - The exception being logged.

error

public static void error(java.lang.String message)
Writes a log message.

Parameters:
message - The message to log.

error

public static void error(java.lang.String message,
                         com.hyper9.common.beans.Bean bean)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.

error

public static void error(java.lang.String message,
                         java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
throwable - The exception being logged.

error

public static void error(java.lang.String message,
                         com.hyper9.common.beans.Bean bean,
                         java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.
throwable - The exception being logged.

warn

public static void warn(java.lang.String message)
Writes a log message.

Parameters:
message - The message to log.

warn

public static void warn(java.lang.String message,
                        com.hyper9.common.beans.Bean bean)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.

warn

public static void warn(java.lang.String message,
                        java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
throwable - The exception being logged.

warn

public static void warn(java.lang.String message,
                        com.hyper9.common.beans.Bean bean,
                        java.lang.Throwable throwable)
Writes a log message.

Parameters:
message - The message to log.
bean - The object that is the target of the log message.
throwable - The exception being logged.

logOnLevel

public static void logOnLevel(java.lang.String message,
                              java.lang.Exception e)
Parameters:
message -
e -


Copyright © 2009 Hyper9. All Rights Reserved.