net.sf.sasl.aop.logging
Class LogConfigBean

java.lang.Object
  extended by net.sf.sasl.aop.logging.LogConfigBean

public class LogConfigBean
extends Object

Log configuration which could be used to pass configurations to an instance of the GenericLogAspect class from a spring bean configuration file.

Since:
0.0.2 (sasl-common-aspect-library)
Author:
Philipp Förmer

Constructor Summary
LogConfigBean()
           
 
Method Summary
 String getConcatedLogText()
          Concats all log strings setted via setLogTextList(List) and returns it.
 Set<TargetMethodExecutionPhase> getExecutionPhaseSet()
           
 Map<String,LogLevel> getLoggerConfigMap()
           
 Map<org.slf4j.Logger,LogLevel> getLoggerLogLevelMap()
          Same as calling getLoggerConfigMap() with the difference that all string keys have been transformed to logger objects.
 List<String> getLogTextList()
           
 boolean isOneLogLinePerLogTextLine()
           
 void setExecutionPhaseSet(Set<TargetMethodExecutionPhase> executionPhaseSet)
          Sets a set of execution phases of the target method to which the configuration should belong.
 void setLoggerConfigMap(Map<String,LogLevel> loggerConfigMap)
          Sets a map of (loggerName, logLevel) pairs.
 void setLogTextList(List<String> logTextList)
          Sets a list of log strings that should get logged.
 void setOneLogLinePerLogTextLine(boolean oneLogLinePerLogTextLine)
          Sets whether each line of the log text should be logged in a separate log line or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogConfigBean

public LogConfigBean()
Method Detail

isOneLogLinePerLogTextLine

public boolean isOneLogLinePerLogTextLine()
Returns:
true or false.
Since:
0.0.2 (sasl-common-aspect-library)
See Also:
setOneLogLinePerLogTextLine(boolean)

setOneLogLinePerLogTextLine

public void setOneLogLinePerLogTextLine(boolean oneLogLinePerLogTextLine)
Sets whether each line of the log text should be logged in a separate log line or not.

Parameters:
oneLogLinePerLogTextLine - true or false.
Since:
0.0.2 (sasl-common-aspect-library)

getLogTextList

public List<String> getLogTextList()
Returns:
non null.
Since:
0.0.2 (sasl-common-aspect-library)
See Also:
setLogTextList(List)

setLogTextList

public void setLogTextList(List<String> logTextList)
                    throws IllegalArgumentException
Sets a list of log strings that should get logged. The log strings could be placeholder scripts. All log strings will be concated to one large log string. Null elements will be ignored.

Parameters:
logTextList - non null.
Throws:
IllegalArgumentException - if logTextList is null.

getConcatedLogText

public String getConcatedLogText()
Concats all log strings setted via setLogTextList(List) and returns it.

Returns:
non null
Since:
0.0.2 (sasl-common-aspect-library)

getLoggerConfigMap

public Map<String,LogLevel> getLoggerConfigMap()
Returns:
non null
Since:
0.0.2 (sasl-common-aspect-library)
See Also:
setLoggerConfigMap(Map)

setLoggerConfigMap

public void setLoggerConfigMap(Map<String,LogLevel> loggerConfigMap)
                        throws IllegalArgumentException
Sets a map of (loggerName, logLevel) pairs. The log string (possibly before interpreted as placeholder script) will get logged by each logger with the configured log level for the logger. The null key and null values will be ignored.

Parameters:
loggerConfigMap - non null.
Throws:
IllegalArgumentException - if loggerConfigMap is null.
Since:
0.0.2 (sasl-common-aspect-library)

getLoggerLogLevelMap

public Map<org.slf4j.Logger,LogLevel> getLoggerLogLevelMap()
Same as calling getLoggerConfigMap() with the difference that all string keys have been transformed to logger objects.

Returns:
non null
Since:
0.0.2 (sasl-common-aspect-library)

getExecutionPhaseSet

public Set<TargetMethodExecutionPhase> getExecutionPhaseSet()
Returns:
non null
Since:
0.0.2 (sasl-common-aspect-library)
See Also:
setExecutionPhaseSet(Set)

setExecutionPhaseSet

public void setExecutionPhaseSet(Set<TargetMethodExecutionPhase> executionPhaseSet)
                          throws IllegalArgumentException
Sets a set of execution phases of the target method to which the configuration should belong. The null element will be ignored.

Parameters:
executionPhaseSet - non null
Throws:
IllegalArgumentException - if executionPhaseSet is null.
Since:
0.0.2 (sasl-common-aspect-library)


Copyright © 2010. All Rights Reserved.