How do I send log4cplus appender output to a memory buffer?
Asked Answered
H

1

0

I'm writing a logger that works for both managed and unmanaged code so I'm using log4cplus under the Test Driven Development (TDD) paradigm with Visual Studio 2013 Unmanaged Code Unit Tests under Test Explorer. Trouble is, I can't figure out how to send log4cplus output to the Assert statements.

How do I send log4cplus output to a memory buffer that I can access in the Unit Tests?

If I have to write a customized appender , what would that look like?

Heracliteanism answered 2/5, 2016 at 22:10 Comment(1)
For reference, see ExampleCustomAppender @ SOSimoneaux
B
1

You would have to create your own appender implementation that does that. To do this, inherit from Appender and implement append().

Bax answered 3/5, 2016 at 5:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.