private QueryIteratorCheck(QueryIterator qIter, ExecutionContext execCxt) { super(qIter) ; if ( qIter instanceof QueryIteratorCheck ) Log.warn(this, "Checking checked iterator") ; this.execCxt = execCxt ; } @Override
/** * Set to error level. Works for Log4j and Java logging as the logging * provider to Apache common logging or slf4j. */ static public void setError(String logger) { setLevel(logger, "error") ; }
/** * Set logging, suitable for a command line application. * If "log4j.configuration" not set, then use the built-in default, * else just leave to log4j startup. */ public static void setCmdLogging() { setCmdLogging(log4Jsetup) ; }
public QueryIterRepeatApply( QueryIterator input , ExecutionContext context) { super(input, context) ; this.currentStage = null ; if ( input == null ) { Log.error(this, "[QueryIterRepeatApply] Repeated application to null input iterator") ; return ; } }
private void log(String fmt, Object... args) { if ( TRACKING ) FmtLog.debug(log, fmt, args); } }
@Override public Version find(Id id) { // XXX PatchLogBase.find(Id) FmtLog.warn(LOG, "Not implemented (yet). find(Id)"); return Version.UNSET; }
public ProgressLogger(Logger log, String label, long tickPoint, int superTick) { super(label, tickPoint, superTick, (fmt, args)->print(log, fmt, args) ) ; }
/** Start time, in system nanos */ public long getFinishTime() { if ( ! finishTimeIsSet ) Log.warn(this, "Finish time is not set") ; return finishTime ; }
public SortCondition(Expr expr, int dir) { expression = expr ; direction = dir ; if ( dir != Query.ORDER_ASCENDING && dir != Query.ORDER_DESCENDING && dir != Query.ORDER_DEFAULT ) Log.error(this, "Unknown sort direction") ; }
/** * Turn on a logger (all levels). Works for Log4j and Java logging as the * logging provider to Apache common logging or slf4j. */ static public void disable(String logger) { setLevel(logger, "OFF") ; }
/** A write transaction has been processed and all changes propagated back to the database */ /*package*/ void signalEnacted() { synchronized (this) { if ( ! changesPending ) Log.warn(this, "Transaction was a read transaction or a write transaction that has already been flushed") ; changesPending = false ; } }
/** * Set to info level. Works for Log4j and Java logging as the logging * provider to Apache common logging or slf4j. */ static public void setInfo(String logger) { setLevel(logger, "info") ; }
@Override public void parseFinish() { if ( depth != 0 ) Log.warn(this, "Stack error: depth ="+depth+" at end of parse run") ; depth = -1 ; }
/** * Set to warning level. Works for Log4j and Java logging as the logging * provider to Apache common logging or slf4j. */ static public void setWarn(String logger) { setLevel(logger, "warn") ; }
/** Return the recorded time taken in milliseconds. * {@link #setStartTime} and {@link #setFinishTime} * must have been called. */ public long getTime() { if ( ! startTimeIsSet ) Log.warn(this, "Start time not set") ; if ( ! finishTimeIsSet ) Log.warn(this, "Finish time not set") ; return (finishTime-startTime)/(1000*1000) ; }
/** Start time, in system nanos */ public long getStartTime() { if ( ! startTimeIsSet ) Log.warn(this, "Start time is not set") ; return startTime ; }
/** Return the recorded time taken in milliseconds. * {@link #setStartTime} and {@link #setFinishTime} * must have been called. */ public long getTime() { if ( ! startTimeIsSet ) Log.warn(this, "Start time not set") ; if ( ! finishTimeIsSet ) Log.warn(this, "Finish time not set") ; return (finishTime-startTime)/(1000*1000) ; }
@Override public void parseFinish() { if ( depth != 0 ) Log.warn(this, "Stack error: depth ="+depth+" at end of parse run") ; depth = -1 ; }
private QueryIteratorCheck(QueryIterator qIter, ExecutionContext execCxt) { super(qIter) ; if ( qIter instanceof QueryIteratorCheck ) Log.warn(this, "Checking checked iterator") ; this.execCxt = execCxt ; } @Override
/** Start time, in system nanos */ public long getStartTime() { if ( ! startTimeIsSet ) Log.warn(this, "Start time is not set") ; return startTime ; }