Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13334

Message parameter for log component

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.21.5
    • None
    • camel-core
    • None
    • Unknown

    Description

      There does not seem to be a good way to log a message describing what is logged.

      Imagine I have a route, where I want to be able to trace all the content. I could use .log() processor but log component is better for tracing all the exchange details and also provides showStreams option.

       

      from(direct:in)
      .to(log:MyTestClass?level=TRACE)
      .to(direct:step1)
      .to(log:MyTestClass?level=TRACE)
      .to(direct:step2)
      .to(log:MyTestClass?level=TRACE)
      .to(direct:step3)
      .to(log:MyTestClass?level=TRACE)
      .to(mock:result)
      

       

      In the resulting log, it will be hard to see which line is produced by which log producer.

      Something like 

      .to(log:MyTestClass?level=TRACE&message=user before step1)

      would be quite helpful. Wondering why it has not been implemented yet. I found only early requests from 2008. 

      Beeing able to use simple language would be even better:  

      .to(log:MyTestClass?level=TRACE&message=user before step1 - ${header.user.name})

       

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            antidote2 Robert Half
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: