# Run the logging demos WITH a log4j2 properties file.
#
# "." is at the front of classpath to ensure you get the logging
# properties when running the script in the source directory
# under maven project structure in the Javasrc project.
# Use elsewhere may require tweaking of some settings.

build=../../../../target/classes
log4j2_jar=\
${HOME}/.m2/repository/org/apache/logging/log4j/log4j-api/2.13.0/log4j-api-2.13.0.jar:\
${HOME}/.m2/repository/org/apache/logging/log4j/log4j-core/2.13.0/log4j-core-2.13.0.jar

echo "==> Log4JDemo"
java -classpath ".:${build}:${log4j2_jar}" logging.Log4JDemo

echo "==> Log4JDemo2"
java -classpath ".:${build}:${log4j2_jar}" logging.Log4JDemo2

echo "==> Log4JLambda"
java -classpath ".:${build}:${log4j2_jar}" logging.Log4JLambda
