wt.ixb.publicforhandlers
Class LogHelper

java.lang.Object
  extended bywt.ixb.publicforhandlers.LogHelper

public class LogHelper
extends Object


Nested Class Summary
static class LogHelper.IxbException
           
 
Field Summary
static boolean DEBUG
           
private static Hashtable handlerRegistry
           
static int LOG_LEVEL_1
           
static int LOG_LEVEL_10
           
static int LOG_LEVEL_5
           
static int logLevel
           
static String RESOURCE
           
private static boolean warningAsError
           
 
Constructor Summary
LogHelper()
           
 
Method Summary
static void assertValue(boolean v)
           
static void devError(String msg)
           
static void devExc(Exception e, String msg)
           
static void devExcFinalize(Exception e, String msg)
           
static void devExcFinalize(Exception e, String msg, ApplicationExpImportHandler handler)
           
static void devLog(String msg)
           
private static void devLogImpl(String s)
           
static void finishIxbLogEnvironment(boolean envWasReallyInited)
           
private static ApplicationExpImportHandler getApplicationLogHandlerFromEnvironment()
           
static String getIXBLogImage(Object obj)
          Most Windchill objects do not implement toString().
private static String getLocalizedMsg(String msgId, Object[] params)
           
private static String getLocalizedMsg(String msgId, String msgParam)
           
private static String getLocalizedMsg(String msgId, String msgParam1, String msgParam2)
           
static String getVersionIteration(Versioned ob)
           
static boolean getWarningAsError()
           
static void initialize()
           
private static void logExc(Exception e, String msg)
           
private static void PP(String s)
           
static boolean startIxbLogEnvironment(ApplicationExpImportHandler handler)
           
static void userError(String msgId)
           
static void userError(String msgId, Object[] params)
           
static void userError(String msgId, String msgParam)
           
static void userError(String in_RB, String msgKey, Object[] params)
           
static void userError(String msgId, String msgParam1, String msgParam2)
           
static void userError(String msgId, String msgParam1, String msgParam2, String msgParam3)
           
static void userExc(Exception e, String msgId, Object[] params)
           
static void userExc(Exception e, String msgId, String msgParam)
           
static void userExc(Exception e, String msgId, String msgParam1, String msgParam2)
           
static void userExc(Exception e, String msgId, String msgParam1, String msgParam2, String msgParam3)
           
static void userLog(String msgId)
           
static void userLog(String msgId, int importanceLevel)
           
static void userLog(String msgId, String msgParam)
           
static void userLog(String msgId, String msgParam, int importanceLevel)
           
static void userLog(String rs, String msgId, Object[] params)
           
static void userLog(String rs, String msgId, Object[] params, int importanceLevel)
           
static void userLog(String msgId, String msgParam1, String msgParam2)
           
static void userLog(String msgId, String msgParam1, String msgParam2, int importanceLevel)
           
static void userLog(String msgId, String msgParam1, String msgParam2, String msgParam3)
           
private static void userLogImpl(String rb, String key, Object[] params, ApplicationExpImportHandler handler, int importanceLevel)
           
private static void userLogImpl(String rb, String key, Object[] params, int importanceLevel)
           
static void userWarning(Exception e, String msgId, Object[] params)
           
static void userWarning(Exception e, String msgId, String msgParam)
           
static void userWarning(Exception e, String msgId, String msgParam1, String msgParam2)
           
static void userWarning(String msgId, Object[] params)
           
static void userWarning(String msgId, String msgParam)
           
static void userWarning(String in_RB, String msgKey, Object[] params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_LEVEL_1

public static final int LOG_LEVEL_1
See Also:
Constant Field Values

LOG_LEVEL_5

public static final int LOG_LEVEL_5
See Also:
Constant Field Values

LOG_LEVEL_10

public static final int LOG_LEVEL_10
See Also:
Constant Field Values

DEBUG

public static boolean DEBUG

warningAsError

private static boolean warningAsError

logLevel

public static int logLevel

RESOURCE

public static final String RESOURCE
See Also:
Constant Field Values

handlerRegistry

private static Hashtable handlerRegistry
Constructor Detail

LogHelper

public LogHelper()
Method Detail

initialize

public static void initialize()
                       throws WTException
Throws:
WTException

startIxbLogEnvironment

public static boolean startIxbLogEnvironment(ApplicationExpImportHandler handler)
                                      throws WTException
Throws:
WTException

finishIxbLogEnvironment

public static void finishIxbLogEnvironment(boolean envWasReallyInited)
                                    throws WTException
Throws:
WTException

getApplicationLogHandlerFromEnvironment

private static ApplicationExpImportHandler getApplicationLogHandlerFromEnvironment()
                                                                            throws WTException
Throws:
WTException

getWarningAsError

public static boolean getWarningAsError()
                                 throws WTException
Throws:
WTException

getLocalizedMsg

private static String getLocalizedMsg(String msgId,
                                      Object[] params)

userError

public static void userError(String msgId,
                             Object[] params)
                      throws WTException
Throws:
WTException

userError

public static void userError(String in_RB,
                             String msgKey,
                             Object[] params)
                      throws WTException
Throws:
WTException

userExc

public static void userExc(Exception e,
                           String msgId,
                           Object[] params)
                    throws WTException
Throws:
WTException

userWarning

public static void userWarning(Exception e,
                               String msgId,
                               Object[] params)
                        throws WTException
Throws:
WTException

userWarning

public static void userWarning(String msgId,
                               Object[] params)
                        throws WTException
Throws:
WTException

userWarning

public static void userWarning(String in_RB,
                               String msgKey,
                               Object[] params)
                        throws WTException
Throws:
WTException

userLog

public static void userLog(String rs,
                           String msgId,
                           Object[] params)

assertValue

public static void assertValue(boolean v)
                        throws WTException
Throws:
WTException

devError

public static void devError(String msg)
                     throws WTException
Throws:
WTException

devExcFinalize

public static void devExcFinalize(Exception e,
                                  String msg,
                                  ApplicationExpImportHandler handler)

devExcFinalize

public static void devExcFinalize(Exception e,
                                  String msg)

devExc

public static void devExc(Exception e,
                          String msg)
                   throws WTException
Throws:
WTException

devLog

public static void devLog(String msg)

userLogImpl

private static void userLogImpl(String rb,
                                String key,
                                Object[] params,
                                ApplicationExpImportHandler handler,
                                int importanceLevel)

userLogImpl

private static void userLogImpl(String rb,
                                String key,
                                Object[] params,
                                int importanceLevel)

devLogImpl

private static void devLogImpl(String s)

logExc

private static void logExc(Exception e,
                           String msg)
                    throws WTException
Throws:
WTException

getLocalizedMsg

private static String getLocalizedMsg(String msgId,
                                      String msgParam)

getLocalizedMsg

private static String getLocalizedMsg(String msgId,
                                      String msgParam1,
                                      String msgParam2)

userLog

public static void userLog(String msgId,
                           int importanceLevel)

userLog

public static void userLog(String msgId,
                           String msgParam,
                           int importanceLevel)

userLog

public static void userLog(String msgId,
                           String msgParam1,
                           String msgParam2,
                           int importanceLevel)

userLog

public static void userLog(String rs,
                           String msgId,
                           Object[] params,
                           int importanceLevel)

userLog

public static void userLog(String msgId)

userLog

public static void userLog(String msgId,
                           String msgParam)

userLog

public static void userLog(String msgId,
                           String msgParam1,
                           String msgParam2)

userLog

public static void userLog(String msgId,
                           String msgParam1,
                           String msgParam2,
                           String msgParam3)

userError

public static void userError(String msgId)
                      throws WTException
Throws:
WTException

userError

public static void userError(String msgId,
                             String msgParam)
                      throws WTException
Throws:
WTException

userError

public static void userError(String msgId,
                             String msgParam1,
                             String msgParam2)
                      throws WTException
Throws:
WTException

userError

public static void userError(String msgId,
                             String msgParam1,
                             String msgParam2,
                             String msgParam3)
                      throws WTException
Throws:
WTException

userExc

public static void userExc(Exception e,
                           String msgId,
                           String msgParam)
                    throws WTException
Throws:
WTException

userExc

public static void userExc(Exception e,
                           String msgId,
                           String msgParam1,
                           String msgParam2)
                    throws WTException
Throws:
WTException

userExc

public static void userExc(Exception e,
                           String msgId,
                           String msgParam1,
                           String msgParam2,
                           String msgParam3)
                    throws WTException
Throws:
WTException

userWarning

public static void userWarning(String msgId,
                               String msgParam)
                        throws WTException
Throws:
WTException

userWarning

public static void userWarning(Exception e,
                               String msgId,
                               String msgParam)
                        throws WTException
Throws:
WTException

userWarning

public static void userWarning(Exception e,
                               String msgId,
                               String msgParam1,
                               String msgParam2)
                        throws WTException
Throws:
WTException

getVersionIteration

public static String getVersionIteration(Versioned ob)
                                  throws WTException
Throws:
WTException

getIXBLogImage

public static String getIXBLogImage(Object obj)
Most Windchill objects do not implement toString(). This is an attempt to obtain some meaningful String for debugging.

Parameters:
obj - Windchill object
Returns:
String image for debugging

PP

private static void PP(String s)