Package com.dtolabs.rundeck.core.utils
Class ExecToolCommandLogger
- java.lang.Object
-
- org.apache.tools.ant.DefaultLogger
-
- com.dtolabs.rundeck.core.utils.ExecToolCommandLogger
-
- All Implemented Interfaces:
java.util.EventListener,org.apache.tools.ant.BuildListener,org.apache.tools.ant.BuildLogger
public class ExecToolCommandLogger extends org.apache.tools.ant.DefaultLoggerExecToolCommandLogger reformats ant log messages using a Reformatter
-
-
Constructor Summary
Constructors Constructor Description ExecToolCommandLogger(Reformatter formatter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLevel()static java.lang.StringlogLevelToString(int level)Returns a string representing the specified log levelvoidmessageLogged(org.apache.tools.ant.BuildEvent event)Logs a message, if the priority is suitable.static java.lang.StringretrieveModuleName(org.apache.tools.ant.BuildEvent event)Look up the module name value from the project of the build eventstatic java.lang.StringretrieveNodeName(org.apache.tools.ant.BuildEvent event)Look up the server name value from the project of the build eventstatic java.lang.StringretrieveUserName(org.apache.tools.ant.BuildEvent event)Look up the user name value from the project of the build event-
Methods inherited from class org.apache.tools.ant.DefaultLogger
buildFinished, buildStarted, extractProjectName, formatTime, getBuildFailedMessage, getBuildSuccessfulMessage, getMessageOutputLevel, getTimestamp, log, printMessage, setEmacsMode, setErrorPrintStream, setMessageOutputLevel, setOutputPrintStream, targetFinished, targetStarted, taskFinished, taskStarted
-
-
-
-
Constructor Detail
-
ExecToolCommandLogger
public ExecToolCommandLogger(Reformatter formatter)
-
-
Method Detail
-
messageLogged
public void messageLogged(org.apache.tools.ant.BuildEvent event)
Logs a message, if the priority is suitable.
Overridden to add a prefix string.- Specified by:
messageLoggedin interfaceorg.apache.tools.ant.BuildListener- Overrides:
messageLoggedin classorg.apache.tools.ant.DefaultLogger- Parameters:
event- A BuildEvent containing message information. Must not benull.
-
retrieveModuleName
public static java.lang.String retrieveModuleName(org.apache.tools.ant.BuildEvent event)
Look up the module name value from the project of the build event- Parameters:
event- the BuildEvent- Returns:
- the module name
-
retrieveNodeName
public static java.lang.String retrieveNodeName(org.apache.tools.ant.BuildEvent event)
Look up the server name value from the project of the build event- Parameters:
event- the BuildEvent- Returns:
- the value of framework.server.name
-
retrieveUserName
public static java.lang.String retrieveUserName(org.apache.tools.ant.BuildEvent event)
Look up the user name value from the project of the build event- Parameters:
event- the BuildEvent- Returns:
- the user name
-
logLevelToString
public static java.lang.String logLevelToString(int level)
Returns a string representing the specified log level- Parameters:
level- Log level- Returns:
- log level name in string form
-
getLevel
public int getLevel()
-
-