Fuse IDE
  1. Fuse IDE
  2. ECLIPSE-223

Logview to show Camel trace in Fuse IDE

    Details

    • Type: Feature Request Feature Request
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: Camel Editor
    • Labels:
      None
    • Similar Issues:
      Show 7 results 

      Description

      It should be possible to enable trace in a Camel application.

      And then from Fuse IDE to tap into that running Camel application and have a view which shows the trace messages on-line.

      We should consider using a JSon representation of the trace message so we can more easily pump those messages into other usage (eg elasticksearch) for log analytics

        Activity

        Hide
        Claus Ibsen
        added a comment -

        We can build a json outputter ourself in camel-core for that basic stuff to not have any 3rd pary JAR deps

        StringBuilder writer = new StringBuilder();
        writer.append("{ \"host\" : ");
        quote(name, writer);
        writer.append(",\n \"timestamp\" : ");
        quote(formatDate(paxLoggingEvent.getTimeStamp()), writer);
        writer.append(",\n \"level\" : ");
        quote(paxLoggingEvent.getLevel().toString(), writer);
        writer.append(",\n \"logger\" : ");
        quote(paxLoggingEvent.getLoggerName(), writer);
        writer.append(",\n \"thread\" : ");
        quote(paxLoggingEvent.getThreadName(), writer);
        writer.append(",\n \"message\" : ");
        quote(paxLoggingEvent.getMessage(), writer);
        writer.append(",\n \"properties\" : { ");
        boolean first = true;
        for (Object key : paxLoggingEvent.getProperties().keySet()) {
        if (first)

        { first = false; }

        else

        { writer.append(", "); }

        quote(key.toString(), writer);
        writer.append(": ");
        quote(paxLoggingEvent.getProperties().get(key).toString(), writer);
        }
        writer.append(" }");
        writer.append("\n}");

        Show
        Claus Ibsen
        added a comment - We can build a json outputter ourself in camel-core for that basic stuff to not have any 3rd pary JAR deps StringBuilder writer = new StringBuilder(); writer.append("{ \"host\" : "); quote(name, writer); writer.append(",\n \"timestamp\" : "); quote(formatDate(paxLoggingEvent.getTimeStamp()), writer); writer.append(",\n \"level\" : "); quote(paxLoggingEvent.getLevel().toString(), writer); writer.append(",\n \"logger\" : "); quote(paxLoggingEvent.getLoggerName(), writer); writer.append(",\n \"thread\" : "); quote(paxLoggingEvent.getThreadName(), writer); writer.append(",\n \"message\" : "); quote(paxLoggingEvent.getMessage(), writer); writer.append(",\n \"properties\" : { "); boolean first = true; for (Object key : paxLoggingEvent.getProperties().keySet()) { if (first) { first = false; } else { writer.append(", "); } quote(key.toString(), writer); writer.append(": "); quote(paxLoggingEvent.getProperties().get(key).toString(), writer); } writer.append(" }"); writer.append("\n}");

          People

          • Assignee:
            James Strachan
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: