Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-3250. Create a separate log file for Warnings and Errors in MiniOzoneChaosCluster. #711

Merged
merged 2 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ date=$(date +"%Y-%m-%d-%H-%M-%S-%Z")
logfiledirectory="/tmp/chaos-${date}/"
completesuffix="complete.log"
chaossuffix="chaos.log"
problemsuffix="problem.log"
compilesuffix="compile.log"
heapformat="dump.hprof"

Expand All @@ -30,6 +31,8 @@ chaosfilename="${logfiledirectory}${chaossuffix}"
compilefilename="${logfiledirectory}${compilesuffix}"
#log goes to something like /tmp/2019-12-04--00-01-26-IST/dump.hprof
heapdumpfile="${logfiledirectory}${heapformat}"
#log goes to something like /tmp/2019-12-04--00-01-26-IST/problem.log
problemfilename="${logfiledirectory}${problemsuffix}"

#TODO: add gc log file details as well
MVN_OPTS="-XX:+HeapDumpOnOutOfMemoryError "
Expand All @@ -46,6 +49,7 @@ mvn exec:java \
-Dexec.mainClass="org.apache.hadoop.ozone.TestMiniChaosOzoneCluster" \
-Dexec.classpathScope=test \
-Dchaoslogfilename=${chaosfilename} \
-Dproblemlogfilename=${problemfilename} \
-Dorg.apache.ratis.thirdparty.io.netty.allocator.useCacheForAllThreads=false \
-Dio.netty.leakDetection.level=advanced \
-Dio.netty.leakDetectionLevel=advanced \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# limitations under the License.
# log4j configuration used during build and unit tests

log4j.rootLogger=INFO,stdout
log4j.rootLogger=INFO,stdout,PROBLEM
log4j.threshold=ALL
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
Expand All @@ -28,4 +28,11 @@ log4j.appender.CHAOS.File=${chaoslogfilename}
log4j.appender.CHAOS=org.apache.log4j.FileAppender
log4j.appender.CHAOS.layout=org.apache.log4j.PatternLayout
log4j.appender.CHAOS.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L)) - %m%n

log4j.appender.PROBLEM.File=${problemlogfilename}
log4j.appender.PROBLEM.Threshold=WARN
log4j.appender.PROBLEM=org.apache.log4j.FileAppender
log4j.appender.PROBLEM.layout=org.apache.log4j.PatternLayout
log4j.appender.PROBLEM.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L)) - %m%n

log4j.additivity.org.apache.hadoop.ozone.utils=false