Re: How to get hold of the content of log:message

2016-11-14 Thread idioma
So, I am not sure I am heading towards the right direction, but this is what I have come up with the following: @Test public void myTest() throws Exception { //Custom component has been instantiated outside the individual test String headerValue= MyComponen

Re: How to get hold of the content of log:message

2016-11-14 Thread idioma
Claus, thanks for this, but I should have clarified it a bit better. I wrote already a JUNIT test that checks the content of the logs as written out to a file and it is included in a separate test class. My question, I guess, was more about how I can include the testing of the message when I am alr

How to get hold of the content of log:message

2016-11-11 Thread idioma
Hi, I have a route like this: http://camel.apache.org/schema/spring";> My initial test looks like this: @RunWith(CamelSpringJUnit4ClassRunner.class) @BootstrapWith(Camel

Re: Help in testing a custom processor

2016-11-10 Thread idioma
Hi, thanks for your reply. I took a different direction because I felt that writing a custom appender was overengineering a bit. I have gotten the Log4j2 properties to work in order to write the logs into a file and have written two utilities: one for reading the Logs from the abovementioned file a

Re: Help in testing a custom processor

2016-11-09 Thread idioma
Hi, thanks for your reply. It is exactly what I am trying to do as my processor is calling a void method that if a certain condition is met prints out LOG.info("some text {}", arg1, arg2). The issue is that I can't really Unit test the format of the message because it is a void method. I have had a

Help in testing a custom processor

2016-11-09 Thread idioma
I have the following route: http://camel.apache.org/schema/spring";> bean:myLogger is my custom processor for formatting the log messages I am getting. The process method in my custom processor simply calls a private method that appends th