Package com.baulsupp.kolja.log.line

Examples of com.baulsupp.kolja.log.line.BasicLine


public class PlainTextLineParser implements LineParser {
  private static final long serialVersionUID = 5837014928434123410L;

  public Line parse(CharSequence c) {
    BasicLine l = new BasicLine();

    l.setContent(c);

    Map<String, Object> emptyMap = new HashMap<String, Object>();
    l.setValues(emptyMap);

    return l;
  }
View Full Code Here


import com.baulsupp.kolja.log.line.Line;
import com.baulsupp.kolja.log.line.LineParser;

public class PlainTextLineParser implements LineParser {
  public Line parse(CharSequence c) {
    BasicLine l = new BasicLine();

    l.setContent(c);

    Map<String, Object> emptyMap = new HashMap<String, Object>();
    l.setValues(emptyMap);
   
    return l;
  }
View Full Code Here

      System.err.println(e);
    }
  }

  private Line buildLine(LoggingEvent arg0) {
    Line line = new BasicLine(arg0.toString());

    line.setValue(LogConstants.DATE, new Date(arg0.timeStamp));
    line.setValue(LogConstants.CONTENT, arg0.getMessage());

    line.setValue(LogConstants.EXCEPTION, join(arg0.getThrowableStrRep()));
    line.setValue(LogConstants.PRIORITY, Priority.getByName(arg0.getLevel().toString()));
    line.setValue(LogConstants.LOGGER, arg0.getLoggerName());
    line.setValue(LogConstants.THREAD, arg0.getThreadName());

    return line;
  }
View Full Code Here

      System.err.println(e);
    }
  }

  private Line buildLine(LoggingEvent le) {
    Line line = new BasicLine(le.toString());

    line.setValue(LogConstants.DATE, new DateTime(le.getTimeStamp()));
    line.setValue(LogConstants.CONTENT, le.getMessage());

    line.setValue(LogConstants.EXCEPTION, join(le.getThrowableInformation().getThrowableStrRep()));
    line.setValue(LogConstants.PRIORITY, Priority.getByName(le.getLevel().toString()));
    line.setValue(LogConstants.LOGGER, le.getLoggerRemoteView().getName());
    line.setValue(LogConstants.THREAD, le.getThreadName());

    for (Map.Entry<String, String> e : le.getMDCPropertyMap().entrySet()) {
      line.setValue(e.getKey(), e.getValue());
    }

    return line;
  }
View Full Code Here

TOP

Related Classes of com.baulsupp.kolja.log.line.BasicLine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.