mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Improve logging
This commit is contained in:
parent
60576049cf
commit
82ce478123
@ -52,7 +52,10 @@ public class RestartUtil {
|
||||
|
||||
try {
|
||||
final String command = "nohup " + cmd.toString() + " >/dev/null 2>" + logPath + " &";
|
||||
log.warn("Executing cmd for restart:\n" + command);
|
||||
log.warn("\n\n############################################################\n" +
|
||||
"Executing cmd for restart: {}" +
|
||||
"\n############################################################\n\n",
|
||||
command);
|
||||
Runtime.getRuntime().exec(command);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -94,7 +94,10 @@ public class SeedNodeMain extends BitsquareExecutable {
|
||||
long usedMemoryInMB = Profiler.getUsedMemoryInMB();
|
||||
if (!stopped) {
|
||||
if (usedMemoryInMB > (MAX_MEMORY_MB - 100)) {
|
||||
log.warn("We are over our memory warn limit and call the GC");
|
||||
log.warn("\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n" +
|
||||
"We are over our memory warn limit and call the GC. usedMemoryInMB: {}" +
|
||||
"\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n",
|
||||
usedMemoryInMB);
|
||||
System.gc();
|
||||
usedMemoryInMB = Profiler.getUsedMemoryInMB();
|
||||
Profiler.printSystemLoad(log);
|
||||
|
Loading…
Reference in New Issue
Block a user