public LogChannel( Object subject, LoggingObjectInterface parentObject ) { if ( parentObject != null ) { this.logLevel = parentObject.getLogLevel(); this.containerObjectId = parentObject.getContainerObjectId(); } else { this.logLevel = DefaultLogLevel.getLogLevel(); this.containerObjectId = null; } logChannelId = LoggingRegistry.getInstance().registerLoggingSource( subject ); }
public GPLoadDataOutput( GPLoad gpLoad, GPLoadMeta meta, LogLevel logLevel ) { this( gpLoad, meta ); log = new LogChannel( this ); log.setLogLevel( logLevel ); }
private void logToLogger( Logger logger, LogLevel logLevel, LoggingObjectInterface loggingObject, LogMessage message ) { logToLogger( logger, logLevel, "[" + getDetailedSubject( loggingObject ) + "] " + message.getMessage() ); }
public void loadSettings() { LogLevel logLevel = LogLevel.getLogLevelForCode( props.getLogLevel() ); DefaultLogLevel.setLogLevel( logLevel ); log.setLogLevel( logLevel ); KettleLogStore.getAppender().setMaxNrLines( props.getMaxNrLinesInLog() ); // transMeta.setMaxUndo(props.getMaxUndo()); DBCache.getInstance().setActive( props.useDBCache() ); }
public LogWriterObject( String subject, LoggingObjectInterface parent, LogLevel logLevel ) { this.subject = subject; this.parent = parent; this.logLevel = logLevel; this.writerLog = new LogChannel( this, parent ); this.containerObjectId = writerLog.getContainerObjectId(); }
public LogChannel( Object subject ) { logLevel = DefaultLogLevel.getLogLevel(); logChannelId = LoggingRegistry.getInstance().registerLoggingSource( subject ); }
private TransLogTable getTransLogTableWithAllEqFields( String fieldsValue ) { TransLogTable transLogTable = TransLogTable.getDefault( mockedVariableSpace, mockedHasDbInterface, null ); initCommonTableFields( transLogTable, fieldsValue ); transLogTable.setLogInterval( fieldsValue ); transLogTable.setLogSizeLimit( fieldsValue ); return transLogTable; }
private JobLogTable getJobLogTableWithAllEqFields( String fieldsValue ) { JobLogTable jobLogTable = JobLogTable.getDefault( mockedVariableSpace, mockedHasDbInterface ); initCommonTableFields( jobLogTable, fieldsValue ); jobLogTable.setLogSizeLimit( fieldsValue ); jobLogTable.setLogInterval( fieldsValue ); return jobLogTable; }
@Override public void logDetailed( String s, Object... arguments ) { println( new LogMessage( s, logChannelId, arguments, LogLevel.DETAILED ), logLevel ); }
private boolean isGeneral( String logChannelId ) { LoggingObjectInterface loggingObject = loggingRegistry.getLoggingObject( logChannelId ); return loggingObject != null && LoggingObjectType.GENERAL.equals( loggingObject.getObjectType() ); }
private static String getLogChId( BufferLine bufferLine ) { return ( (LogMessage) bufferLine.getEvent().getMessage() ).getLogChannelId(); } }
public void println( LogMessageInterface message, Throwable e, LogLevel channelLogLevel ) { println( message, channelLogLevel ); String stackTrace = Const.getStackTracker( e ); LogMessage traceMessage = new LogMessage( stackTrace, message.getLogChannelId(), LogLevel.ERROR ); println( traceMessage, channelLogLevel ); }
private PerformanceLogTable getPerformanceLogTableWithAllEqFields( String fieldsValue ) { PerformanceLogTable performanceLogTable = PerformanceLogTable.getDefault( mockedVariableSpace, mockedHasDbInterface ); initCommonTableFields( performanceLogTable, fieldsValue ); performanceLogTable.setLogInterval( fieldsValue ); return performanceLogTable; }
/** * @return the number (sequence, 1..N) of the last log line. If no records are present in the buffer, 0 is returned. */ public static int getLastBufferLineNr() { return getInstance().appender.getLastBufferLineNr(); }
/** * Get all the log lines for the specified parent log channel id (including all children) * * @param channelId channel IDs to grab * @param includeGeneral include general log lines * @param from * @param to * @return */ public static List<LoggingEvent> getLogBufferFromTo( List<String> channelId, boolean includeGeneral, int from, int to ) { return convertKettleLoggingEventsToLog4jLoggingEvents( KettleLogStore.getLogBufferFromTo( channelId, includeGeneral, from, to ) ); }
/** * Get the subject of a field with the specified ID * * @param id * @return the subject or null if no field could be find with the specified id */ public Object getSubject( String id ) { LogTableField field = findField( id ); if ( field == null ) { return null; } return field.getSubject(); }
@Override public void logDetailed( String s ) { println( new LogMessage( s, logChannelId, LogLevel.DETAILED ), logLevel ); }
@Override public void logMinimal( String s ) { println( new LogMessage( s, logChannelId, LogLevel.MINIMAL ), logLevel ); }
@Override public void logError( String s, Object... arguments ) { println( new LogMessage( s, logChannelId, arguments, LogLevel.ERROR ), logLevel ); }