Zemian Deng avatar Zemian Deng committed b968961

Added timemachine-spring module to project.

Comments (0)

Files changed (11)

 		<module>timemachine-scheduler</module>
 		<module>timemachine-hibernate</module>
 		<module>timemachine-web</module>
+		<module>timemachine-spring</module>
 		<module>timemachine-dist</module>
 	</modules>
 

timemachine-spring/bin/run-java

+#!/usr/bin/env bash
+#
+# Copyright 2012 Zemian Deng
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#    http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A wrapper script that run any Java application in unix/cygwin bash env.
+#
+# This script is assumed to be located in an application's "bin" directory. It will
+# auto resolve its directory location relative to the application path (which is one 
+# parent up from the script.) Therefore, this script can be run any where in the file 
+# system and it will still reference the same application directory.
+#
+# This script will by default auto setup a Java classpath that picks up any "config"
+# and "lib" directories under the application directory. It also will also add a 
+# any typical Maven project output directories such as "target/test-classes", 
+# "target/classes", and "target/dependency" into classpath. This can be disable by 
+# setting RUN_JAVA_NO_AUTOCP=1.
+#
+# If the "Default parameters" section bellow doesn't match to user's env, then user
+# may override these variables in their terminal session or preset them in shell's 
+# profile startup script. The values of all path should be in cygwin/unix path, 
+# and this script will auto convert them into Windows path where is needed.
+#
+# User may customize the Java classpath by setting RUN_JAVA_CP, which will prefix to existing
+# classpath, or use the "-cp" option, which will postfix to existing classpath.
+# 
+# Usage:
+#   run-java [java_opts] <java_main_class> [-cp /more/classpath] [-Dsysprop=value]
+#
+# Example:
+#   run-java example.Hello
+#   run-java example.Hello -Dname=World
+#   run-java org.junit.runner.JUnitCore example.HelloTest -cp "$HOME/apps/junit/lib/*"
+#
+# Created by: Zemian Deng 03/09/2012
+
+# This run script dir (resolve to absolute path)
+SCRIPT_DIR=$(cd $(dirname $0) && pwd)    # This dir is where this script live.
+APP_DIR=$(cd $SCRIPT_DIR/.. && pwd)      # Assume the application dir is one level up from script dir.
+
+# Default parameters
+JAVA_HOME=${JAVA_HOME:=$HOME/apps/jdk}     # This is the home directory of Java development kit.
+RUN_JAVA_CP=${RUN_JAVA_CP:=$CLASSPATH}     # A classpath prefix before -classpath option, default to $CLASSPATH
+RUN_JAVA_OPTS=${RUN_JAVA_OPTS:=}           # Java options (-Xmx512m -XX:MaxPermSize=128m etc)
+RUN_JAVA_DEBUG=${RUN_JAVA_DEBUG:=}         # If not empty, print the full java command line before executing it.
+RUN_JAVA_NO_PARSE=${RUN_JAVA_NO_PARSE:=}   # If not empty, skip the auto parsing of -D and -cp options from script arguments.
+RUN_JAVA_NO_AUTOCP=${RUN_JAVA_NO_AUTOCP:=} # If not empty, do not auto setup Java classpath
+RUN_JAVA_DRY=${RUN_JAVA_DRY:=}             # If not empty, do not exec Java command, but just print
+
+# OS specific support.  $var _must_ be set to either true or false.
+CYGWIN=false;
+case "`uname`" in
+  CYGWIN*) CYGWIN=true ;;
+esac
+
+# Define where is the java executable is
+JAVA_CMD=java
+if [ -d "$JAVA_HOME" ]; then
+	JAVA_CMD="$JAVA_HOME/bin/java"
+fi
+
+# Auto setup applciation's Java Classpath (only if they exists)
+if [ -z "$RUN_JAVA_NO_AUTOCP" ]; then
+	if $CYGWIN; then
+		# Provide Windows directory conversion
+		JAVA_HOME_WIN=$(cygpath -aw "$JAVA_HOME")
+		APP_DIR_WIN=$(cygpath -aw "$APP_DIR")
+
+		if [ -d "$APP_DIR_WIN\config" ]; then RUN_JAVA_CP="$RUN_JAVA_CP;$APP_DIR_WIN\config" ; fi
+		if [ -d "$APP_DIR_WIN\target\test-classes" ]; then RUN_JAVA_CP="$RUN_JAVA_CP;$APP_DIR_WIN\target\test-classes" ; fi
+		if [ -d "$APP_DIR_WIN\target\classes" ]; then RUN_JAVA_CP="$RUN_JAVA_CP;$APP_DIR_WIN\target\classes" ; fi
+		if [ -d "$APP_DIR_WIN\target\dependency" ]; then RUN_JAVA_CP="$RUN_JAVA_CP;$APP_DIR_WIN\target\dependency\*" ; fi
+		if [ -d "$APP_DIR_WIN\lib" ]; then RUN_JAVA_CP="$RUN_JAVA_CP;$APP_DIR_WIN\lib\*" ; fi
+	else
+		if [ -d "$APP_DIR/config" ]; then RUN_JAVA_CP="$RUN_JAVA_CP:$APP_DIR/config" ; fi
+		if [ -d "$APP_DIR/target/test-classes" ]; then RUN_JAVA_CP="$RUN_JAVA_CP:$APP_DIR/target/test-classes" ; fi
+		if [ -d "$APP_DIR/target/classes" ]; then RUN_JAVA_CP="$RUN_JAVA_CP:$APP_DIR/target/classes" ; fi
+		if [ -d "$APP_DIR/target/dependency" ]; then RUN_JAVA_CP="$RUN_JAVA_CP:$APP_DIR/target/dependency/*" ; fi
+		if [ -d "$APP_DIR/lib" ]; then RUN_JAVA_CP="$RUN_JAVA_CP:$APP_DIR/lib/*" ; fi
+	fi
+fi
+
+# Parse addition "-cp" and "-D" after the Java main class from script arguments
+#   This is done for convenient sake so users do not have to export RUN_JAVA_CP and RUN_JAVA_OPTS
+#   saparately, but now they can pass into end of this run-java script instead.
+#   This can be disable by setting RUN_JAVA_NO_PARSE=1.
+if [ -z "$RUN_JAVA_NO_PARSE" ]; then	
+	# Prepare variables for parsing
+	FOUND_CP=
+	declare -a NEW_ARGS
+	IDX=0
+	
+	# Parse all arguments and look for "-cp" and "-D"
+	for ARG in "$@"; do
+		if [[ -n $FOUND_CP ]]; then	
+			if [ "$OS" = "Windows_NT" ]; then
+				# Can't use cygpath here, because cygpath will auto expand "*", which we do not
+				# want. User will just have to use OS path when specifying "-cp" option.	
+				#ARG=$(cygpath -w -a $ARG)
+				RUN_JAVA_CP="$RUN_JAVA_CP;$ARG"
+			else
+				RUN_JAVA_CP="$RUN_JAVA_CP:$ARG"
+			fi
+			FOUND_CP=
+		else
+			case $ARG in
+			'-cp')
+				FOUND_CP=1
+				;;
+			'-D'*)
+				RUN_JAVA_OPTS="$RUN_JAVA_OPTS $ARG"
+				;;
+			*)
+				NEW_ARGS[$IDX]="$ARG"
+				let IDX=$IDX+1
+				;;
+			esac
+		fi
+	done
+		
+	# Display full Java command.
+	if [ -n "$RUN_JAVA_DEBUG" ] || [ -n "$RUN_JAVA_DRY" ]; then
+		echo "$JAVA_CMD" $RUN_JAVA_OPTS -cp "$RUN_JAVA_CP" "${NEW_ARGS[@]}"
+	fi
+	
+	# Run Java Main class using parsed variables
+	if [ -z "$RUN_JAVA_DRY" ]; then
+		"$JAVA_CMD" $RUN_JAVA_OPTS -cp "$RUN_JAVA_CP" "${NEW_ARGS[@]}"
+	fi
+else
+	# Display full Java command.
+	if [ -n "$RUN_JAVA_DEBUG" ] || [ -n "$RUN_JAVA_DRY" ]; then
+		echo "$JAVA_CMD" $RUN_JAVA_OPTS -cp "$RUN_JAVA_CP" "$@"
+	fi
+	
+	# Run Java Main class
+	if [ -z "$RUN_JAVA_DRY" ]; then
+		"$JAVA_CMD" $RUN_JAVA_OPTS -cp "$RUN_JAVA_CP" "$@"
+	fi
+fi

timemachine-spring/bin/run-spring

+#!/usr/bin/env bash
+#
+# Copyright 2012 Zemian Deng
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#    http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Invoke a tiny Spring Server to bootstrap any xml config file.
+#
+# Created by: Zemian Deng 08/17/2012
+
+DIR=$(dirname $0)
+$DIR/run-java timemachine.scheduler.spring.SpringServer "$@"

timemachine-spring/config/scheduler-spring.properties

+timemachine.scheduler.schedulerName = SpringScheduler

timemachine-spring/config/timemachine-spring.xml

+<beans xmlns="http://www.springframework.org/schema/beans"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://www.springframework.org/schema/beans
+     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
+
+	<bean id="scheduler" class="timemachine.scheduler.spring.SchedulerFactoryBean">
+		<property name="configPropsUrl" value="config/scheduler-spring.properties"></property>
+		<property name="autoStart" value="true"></property>
+		<property name="autoAddJobDef" value="true"></property>
+	</bean>
+	
+	<bean id="jobDef01" class="timemachine.scheduler.JobDef">
+		<property name="jobTaskClassName" value="timemachine.scheduler.jobtask.ScriptingJobTask"></property>
+		<property name="props">
+			<map>
+				<entry key="scriptEngineName" value="Groovy"></entry>
+				<entry key="scriptText" value="println('Hello World.')"></entry>
+			</map>
+		</property>
+		<property name="schedules">
+			<list>				
+				<bean class="timemachine.scheduler.schedule.CronSchedule">
+					<property name="expression" value="0/3 * * * * ?"></property>
+				</bean>
+			</list>
+		</property>
+	</bean>
+
+</beans>

timemachine-spring/pom.xml

+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+This is a optional TimeMachine project module that can provide Spring Framework integration.
+Since it's optional module, we do not package with the stand-alone TimeMachine package. We generate its own
+timemachine-spring  package.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	
+	<modelVersion>4.0.0</modelVersion>
+	<name>TimeMachine Spring</name>
+	<artifactId>timemachine-spring</artifactId>
+	<packaging>jar</packaging>
+	
+	<parent>
+		<groupId>org.bitbucket.timemachine</groupId>
+		<artifactId>timemachine-parent</artifactId>
+		<version>1.3.0-SNAPSHOT</version>
+	</parent>
+
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.2</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<version>2.3</version>
+				<executions>
+					<execution>
+						<id>bin-assembly</id>
+						<phase>package</phase>
+						<goals>
+							<goal>single</goal>
+						</goals>
+						<configuration>
+							<appendAssemblyId>false</appendAssemblyId>
+							<descriptors>
+								<descriptor>src/main/assembly/bin.xml</descriptor>
+							</descriptors>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<!-- TimeMachine, Logger and Spring libraries -->
+		<dependency>
+			<groupId>org.bitbucket.timemachine</groupId>
+			<artifactId>timemachine-hibernate</artifactId>
+			<version>1.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>1.6.1</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+			<version>3.1.1.RELEASE</version>
+		</dependency>
+		
+		<!-- Optional Groovy scripting engine -->
+		<dependency>
+			<groupId>org.codehaus.groovy</groupId>
+			<artifactId>groovy-all</artifactId>
+			<version>2.0.0</version>
+			<scope>runtime</scope>
+			<optional>true</optional>
+		</dependency>
+		
+		<!-- Testing libraries -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.10</version>
+		</dependency>
+	</dependencies>
+	
+</project>

timemachine-spring/src/main/assembly/bin.xml

+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+	<id>bin</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+	<includeBaseDirectory>true</includeBaseDirectory>
+	<fileSets>
+		<fileSet>
+     		<outputDirectory>.</outputDirectory>
+			<includes>
+				<include>config/*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<includes>
+				<include>bin/*</include>
+			</includes>
+			<fileMode>775</fileMode>
+		</fileSet>
+	</fileSets>
+	<dependencySets>
+		<dependencySet>
+     		<outputDirectory>lib</outputDirectory>
+			<includes>
+				<include>*:jar</include>
+			</includes>
+			<unpack>false</unpack>
+			<scope>runtime</scope>
+		</dependencySet>
+	</dependencySets>
+</assembly>

timemachine-spring/src/main/java/timemachine/scheduler/spring/SchedulerFactoryBean.java

+/*
+ * Copyright 2012 Zemian Deng
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package timemachine.scheduler.spring;
+
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+import timemachine.scheduler.JobDef;
+import timemachine.scheduler.Scheduler;
+import timemachine.scheduler.SchedulerFactory;
+
+/**
+ * A Spring FactoryBean that will return a new instance of TimeMachine scheduler. It will auto pre-load any {@link JobDef}
+ * beans and added into the scheduler instance.
+ * 
+ * @author Zemian Deng
+ */
+public class SchedulerFactoryBean implements FactoryBean<Scheduler>, ApplicationContextAware, InitializingBean,
+		DisposableBean {
+	private static Logger logger = LoggerFactory.getLogger(SchedulerFactoryBean.class);
+	private static Scheduler scheduler;
+	private ApplicationContext appContext;
+	private String configPropsUrl;
+	private boolean autoStart = true;
+	private boolean autoAddJobDef = true;
+
+	public void setAutoAddJobDef(boolean autoAddJobDef) {
+		this.autoAddJobDef = autoAddJobDef;
+	}
+
+	public void setAutoStart(boolean autoStart) {
+		this.autoStart = autoStart;
+	}
+
+	public void setConfigPropsUrl(String configPropsUrl) {
+		this.configPropsUrl = configPropsUrl;
+	}
+
+	@Override
+	public void setApplicationContext(ApplicationContext appContext) throws BeansException {
+		this.appContext = appContext;
+	}
+
+	@Override
+	public Scheduler getObject() throws Exception {
+		if (scheduler == null) {
+			logger.debug("Creating a scheduler using {}", configPropsUrl);
+			scheduler = new SchedulerFactory(configPropsUrl).createScheduler();
+		}
+		return scheduler;
+	}
+
+	@Override
+	synchronized public Class<?> getObjectType() {
+		return Scheduler.class;
+	}
+
+	@Override
+	public boolean isSingleton() {
+		return true;
+	}
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		if (scheduler == null)
+			scheduler = getObject();
+		scheduler.getSchedulerContext().putValue("springContext", appContext);
+		scheduler.init();
+		
+		if (autoAddJobDef) {
+			Map<String, JobDef> beans = appContext.getBeansOfType(JobDef.class);
+			for (Map.Entry<String, JobDef> entry : beans.entrySet()) {
+				logger.debug("Adding job defintion bean: {}", entry.getKey());
+				scheduler.schedule(entry.getValue());
+			}
+		}
+		
+		if (autoStart) {
+			logger.debug("Auto starting scheduler.");
+			scheduler.start();
+		}
+	}
+
+	@Override
+	public void destroy() throws Exception {
+		scheduler.destroy();
+	}
+}

timemachine-spring/src/main/java/timemachine/scheduler/spring/SpringServer.java

+/*
+ * Copyright 2012 Zemian Deng
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package timemachine.scheduler.spring;
+
+import java.util.Arrays;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+/**
+ * A simple spring server. Run this on command line to start it:
+ * <code>java timemachine.spring.SpringServer /path/to/spring-context.xml</code>
+ * Hit <code>CTRL+C</code> to exit.
+ * 
+ * @author Zemian Deng
+ */
+public class SpringServer {
+	
+	private static Logger logger = LoggerFactory.getLogger(SpringServer.class);
+	
+	public static void main(String[] args) {
+		SpringServer main = new SpringServer();
+		main.run(args);
+	}
+
+	public void run(String[] args) {
+		// Check to see if -help or -version are given.
+		if (args.length > 0 && (args[0].equals("-h") || args[0].equals("-help") || args[0].equals("--help"))) {
+			printHelp();
+			return;
+		}
+		else if (args.length > 0 && (args[0].equals("-v") || args[0].equals("-version") || args[0].equals("--version"))) {
+			printVersion();
+			return;
+		}
+		
+		// init spring context and wait as server.
+		String waitTimeStr = System.getProperty("timemachine.spring.SpringServer.waitTime", "0");
+		long waitTime = Long.parseLong(waitTimeStr);
+		ConfigurableApplicationContext springContext = null;
+		try {
+			logger.debug("Starting spring server with {}", Arrays.asList(args));
+			springContext = new FileSystemXmlApplicationContext(args);
+			
+			// Register CTRL+C hook
+			registerShutdownHook(springContext);
+			logger.info("Spring server started.");
+			
+			synchronized (springContext) {
+				springContext.wait(waitTime);
+			}
+		} catch (InterruptedException e) {
+			throw new RuntimeException("Failed to run Spring context.", e);
+		} finally {
+			if (springContext != null) {
+				springContext.close();
+				logger.info("Spring server stopped.");
+			}
+		}
+	}
+
+	private void printVersion() {
+		System.out.println("version: 1.0.0");
+	}
+
+	private void printHelp() {
+		System.out.println("SpringServer");
+		System.out.println();
+		System.out.println("Usage: java [-Dkey=value] " + getClass().getName() + " [options] [/path/to/spring-context.xml]");
+		System.out.println();
+		System.out.println("[options]");
+		System.out.println("  -help     Display this help page.");
+		System.out.println("  -version  Display version information.");
+	}
+
+	private void registerShutdownHook(final ConfigurableApplicationContext springContext) {
+		Runtime.getRuntime().addShutdownHook(new Thread() {
+			public void run() {
+				springContext.close();
+				logger.info("Spring server stopped.");
+			}
+		});
+	}
+}
+

timemachine-spring/src/main/java/timemachine/scheduler/spring/SpringService.java

+/*
+ * Copyright 2012 Zemian Deng
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package timemachine.scheduler.spring;
+
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+import timemachine.scheduler.ConfigPropsListener;
+import timemachine.scheduler.Scheduler;
+import timemachine.scheduler.SchedulerListener;
+import timemachine.scheduler.support.AbstractService;
+import timemachine.scheduler.support.Props;
+
+/**
+ * A TimeMachine service that will contains a Spring Application context. You may use this service
+ * to bootstrap a Spring context through the TimeMachine configuration file.
+ * 
+ * @author Zemian Deng
+ */
+public class SpringService extends AbstractService implements ConfigPropsListener, SchedulerListener {
+
+	private Scheduler scheduler;
+	private Props configProps;
+	private ConfigurableApplicationContext springContext;
+	
+	@Override
+	protected void initService() {
+		String springConfig = configProps.getString("SpringService.configFile");
+		springContext = new FileSystemXmlApplicationContext(springConfig);
+		scheduler.getSchedulerContext().putValue("springContext", springContext);
+	}
+	
+	@Override
+	public void onConfigProps(Props configProps) {
+		this.configProps = configProps;
+	}
+
+	@Override
+	public void onScheduler(Scheduler scheduler) {
+		this.scheduler = scheduler;
+	}	
+}

timemachine-spring/src/main/resources/log4j.properties

+# Copyright 2012 Zemian Deng
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#    http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Define a standard output appender
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+#log4j.appender.CONSOLE.layout.conversionPattern=%d{HH:mm:ss} %t %p %c{1}:%L| %m%n
+log4j.appender.CONSOLE.layout.conversionPattern=%d{HH:mm:ss} %p| %m%n
+
+# Define the root logger/global logging level with all appenders, default to use INFO level.
+log4j.rootLogger = INFO, CONSOLE
+
+# TimeMachine scheduler application
+log4j.logger.timemachine.scheduler = INFO
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.