Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Merge pull request #8 from toptal/inf-print-logs-only-when-blocked
Browse files Browse the repository at this point in the history
Print logs only when blocked or dump is saved
  • Loading branch information
Alexey Shein authored Jul 22, 2019
2 parents 4ca868e + 6591976 commit 83083d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</target>

<target name="jar" depends="compile">
<property name="version" value="0.9.1"/>
<property name="version" value="1.0.0"/>
<mkdir dir="dist"/>
<jar destfile="dist/jvm-monitoring-agent-${version}.jar" basedir="build/classes">
<manifest>
Expand Down
5 changes: 4 additions & 1 deletion src/com/toptal/jvm/monitoring/Agent.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Copyright 2017 Michal Papis <[email protected]>
* Copyright 2019 Alexey Shein <[email protected]>
*
* This file is part of JVM Monitoring Agent.
*
Expand Down Expand Up @@ -119,7 +120,9 @@ public void run()
lastSave = loopStartTime;
msg += " - saved dump: "+dumpFileName;
}
log(msg);
if (blockedToLong || savedDump) {
log(msg);
}
}

private void log(String msg)
Expand Down

0 comments on commit 83083d3

Please sign in to comment.