I need to write a logging api which does the actual logging on a seperate thread.
i.e. I have an application which wants to log some information. It calls my API and the api captures all the arguments etc and then hands that off to a seperate thread to be logged.
The logger api accepts variadic arguments and therefore my initial thoughts were to capture the whole call stack and somehow hand it to the thread whcih will do the logging.
I'm reasonable happy that I can capture the call stack. However I'm not sure how I'd pass this call stack off to another method.
I'm using g++ on linux and it may also have to work with Sun's CC v12 on solaris.
Any ideas.