class LogChannel implements ILogChannel {

  public void println( ILogMessage logMessage, LogLevel channelLogLevel ) {
    String subject = null;

    LogLevel logLevel = logMessage.getLevel();

    if ( !logLevel.isVisible( channelLogLevel ) ) {
      return; // not for our eyes.
    }

    if ( subject == null ) {
      subject = "Hop";
    }

    // Are the message filtered?
    //
    if ( !logLevel.isError() && !Utils.isEmpty( filter ) ) {
      if ( subject.indexOf( filter ) < 0 && logMessage.toString().indexOf( filter ) < 0 ) {
        return; // "filter" not found in row: don't show!
      }
    }

    // Let's not keep everything...
    //
    if ( channelLogLevel.getLevel() >= logLevel.getLevel() ) {
      HopLoggingEvent loggingEvent = new HopLoggingEvent( logMessage, System.currentTimeMillis(), logLevel );
      HopLogStore.getAppender().addLogggingEvent( loggingEvent );

      if ( this.fileWriter == null ) {
        this.fileWriter = LoggingRegistry.getInstance().getLogChannelFileWriterBuffer( logChannelId );
      }

      // add to buffer
      if ( this.fileWriter != null ) {
        this.fileWriter.addEvent( loggingEvent );
      }
    }
  }

  public  LogChannel( Object subject );
  public  LogChannel( Object subject, boolean gatheringMetrics );
  public  LogChannel( Object subject, ILoggingObject parentObject );
  public  LogChannel( Object subject, ILoggingObject parentObject, boolean gatheringMetrics );

}