com.stratelia.silverpeas.silvertrace
Enum SilverTraceLayout

java.lang.Object
  extended by java.lang.Enum<SilverTraceLayout>
      extended by com.stratelia.silverpeas.silvertrace.SilverTraceLayout
All Implemented Interfaces:
Serializable, Comparable<SilverTraceLayout>

public enum SilverTraceLayout
extends Enum<SilverTraceLayout>

Layouts available for Silvertrace.

Author:
ehugonnet

Enum Constant Summary
LAYOUT_CUSTOM
          A layout that can be defined by the user.
LAYOUT_DETAILED
          Detailed layout : Display "Time / Priority / Calling Class and module / Message"
LAYOUT_FULL_DEBUG
          Fully detailed layout : Display "Tic count / Time / Priority / Thread / Calling Class and module / Message"
LAYOUT_HTML
          HTML layout : Display "Time / Thread / Priority / Category / Message" into a TABLE
LAYOUT_SHORT
          Short layout : Display "Time / Priority / Message"
LAYOUT_SPY
          Fully detailed layout : Display "Time / Priority / Thread / Calling Class and module / Message"
 
Method Summary
static SilverTraceLayout findByPattern(String pattern)
           
static org.apache.log4j.Layout getLayout(String patternLayout)
           
 String getPattern()
          Returns the pattern associated with this layout.
static SilverTraceLayout getSilverTraceLayout(String name)
          To be used instead of valueOf since it manages the case of a custom pattern.
 void updatePattern(String customPattern)
          Update the layout pattern.
static SilverTraceLayout valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SilverTraceLayout[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LAYOUT_SHORT

public static final SilverTraceLayout LAYOUT_SHORT
Short layout : Display "Time / Priority / Message"


LAYOUT_HTML

public static final SilverTraceLayout LAYOUT_HTML
HTML layout : Display "Time / Thread / Priority / Category / Message" into a TABLE


LAYOUT_DETAILED

public static final SilverTraceLayout LAYOUT_DETAILED
Detailed layout : Display "Time / Priority / Calling Class and module / Message"


LAYOUT_FULL_DEBUG

public static final SilverTraceLayout LAYOUT_FULL_DEBUG
Fully detailed layout : Display "Tic count / Time / Priority / Thread / Calling Class and module / Message"


LAYOUT_SPY

public static final SilverTraceLayout LAYOUT_SPY
Fully detailed layout : Display "Time / Priority / Thread / Calling Class and module / Message"


LAYOUT_CUSTOM

public static final SilverTraceLayout LAYOUT_CUSTOM
A layout that can be defined by the user.

Method Detail

values

public static SilverTraceLayout[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SilverTraceLayout c : SilverTraceLayout.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SilverTraceLayout valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

updatePattern

public void updatePattern(String customPattern)
Update the layout pattern. This is only available to the LAYOUT_CUSTOM.

Parameters:
customPattern -

getPattern

public String getPattern()
Returns the pattern associated with this layout.

Returns:
the pattern associated with this layout.

findByPattern

public static SilverTraceLayout findByPattern(String pattern)

getLayout

public static org.apache.log4j.Layout getLayout(String patternLayout)

getSilverTraceLayout

public static SilverTraceLayout getSilverTraceLayout(String name)
To be used instead of valueOf since it manages the case of a custom pattern.

Parameters:
name -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.