On Wed, 2009-07-01 at 08:19 -0700, Lukas Zeller wrote: > Hello Patrick, > > Before going into details, i.e. reviewing the patch I'd like to make > sure I understand what is the goal: > > - you want a single log file for ALL logging, which means: > - both global and session log of libsynthesis (including messages > generated by the DB plugins) > - PLUS messages generated by your application > > Right?
Right. > I don't see why you need two engines for that. You can initialize the > same engine twice, once at the beginning with basically only the log > options, and a second time when your generated config stream is ready. How do I do that? Calling InitEngineXML() twice? Wouldn't that reset the logging that was set up earlier? > Within the engine, you need: > > - a new flag to have the session logger redirect its output to the > global logger, and also forwarding the <appendtoexisting> flag to the > global logger such that it won't overwrite the beginning of the log. > Maybe some changes are needed to prevent re-instantiation of the > global logger at the second init, I'll have to check that. Does <appendtoexisting> work for HTML? > - a way to send debug message from the outside (the app) into the > global log. Luckily, these already exist (Beat uses them exactly this > way in his test suite). See DB_DebugPuts, DB_DebugBlock, > DB_DebugEndBlock and DB_DebugEndThread entries in the UI_Call_In > record, or the ready-to-use wrappers for these in SDK_utils (DEBUG_xxx). I looked at those and found them a bit limited: only a single chunk of text can be passed to the engine, without information what kind of message it contains (important error message or just some developer debug stuff). The "logging" branch contains a tentative DebugPuts() call which accepts more information. The long-term goal is to actually put that information into the logs. > But if I'm correct, I think we have do a much less invasive solution - > and especially can avoid EVIL globals :-) Yes, using just one engine would be nice. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. _______________________________________________ os-libsynthesis mailing list [email protected] http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
