Package org.apache.twill.api.logging

Examples of org.apache.twill.api.logging.LogEntry


    @Override
    public void onReceived(Iterator<FetchedMessage> messages) {
      while (messages.hasNext()) {
        String json = Charsets.UTF_8.decode(messages.next().getPayload()).toString();
        try {
          LogEntry entry = GSON.fromJson(json, LogEntry.class);
          if (entry != null) {
            invokeHandlers(entry);
          }
        } catch (Exception e) {
          LOG.error("Failed to decode log entry {}", json, e);
View Full Code Here


    final String line = JsonUtils.getAsString(jsonObj, "line");
    final String thread = JsonUtils.getAsString(jsonObj, "thread");
    final String message = JsonUtils.getAsString(jsonObj, "message");
    final LogThrowable logThrowable = context.deserialize(jsonObj.get("throwable"), LogThrowable.class);

    return new LogEntry() {
      @Override
      public String getLoggerName() {
        return name;
      }
View Full Code Here

    @Override
    public void onReceived(Iterator<FetchedMessage> messages) {
      while (messages.hasNext()) {
        String json = Charsets.UTF_8.decode(messages.next().getPayload()).toString();
        try {
          LogEntry entry = GSON.fromJson(json, LogEntry.class);
          if (entry != null) {
            invokeHandlers(entry);
          }
        } catch (Exception e) {
          LOG.error("Failed to decode log entry {}", json, e);
View Full Code Here

    final String message = JsonUtils.getAsString(jsonObj, "message");

    final StackTraceElement[] stackTraces = context.deserialize(jsonObj.get("stackTraces").getAsJsonArray(),
                                                                StackTraceElement[].class);

    return new LogEntry() {
      @Override
      public String getLoggerName() {
        return name;
      }
View Full Code Here

TOP

Related Classes of org.apache.twill.api.logging.LogEntry

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.