Skip to content

Commit

Permalink
No longer log *anything* to DKV.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnocandel committed Sep 11, 2014
1 parent 4a562bd commit fdc8a6f
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/main/java/water/util/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,26 +437,9 @@ else if( H2O.ICE_ROOT.getScheme() == null || Schemes.FILE.equals(H2O.ICE_ROOT.ge
log0(l4j, e);
}

if( Paxos._cloudLocked && logToKV ) logToKV(e.when.startAsString(), e.thread, e.kind, e.sys, e.body(0));
if(printOnOut || printAll) unwrap(System.out, e.toShortString());
e.printMe = false;
}
/** We also log events to the store. */
private static void logToKV(final String date, final String thr, final Kind kind, final Sys sys, final String msg) {
// Make the LOG_KEY lazily, since we cannot make it before the cloud forms
if( LOG_KEY == null )
if( !Paxos._cloudLocked ) return; // No K/V logging before cloud formed
synchronized(Log.class) {
if( LOG_KEY == null ) LOG_KEY = Key.make("Log", (byte) 0, Key.BUILT_IN_KEY);
}
final long pid = PID; // Run locally
final H2ONode h2o = H2O.SELF; // Run locally
new TAtomic<LogStr>() {
@Override public LogStr atomic(LogStr l) {
return new LogStr(l, date, h2o, pid, thr, kind, sys, msg);
}
}.fork(LOG_KEY);
}
/** Record an exception to the log file and store. */
static public <T extends Throwable> T err(Sys t, String msg, T exception) {
Event e = Event.make(t, Kind.ERRR, exception, msg );
Expand Down

0 comments on commit fdc8a6f

Please sign in to comment.