Page 1 of 1

[Solved] Custom logger

Posted: Tue Jan 16, 2007 12:50
by mba
Hi

I'm trying to implement a custom logging mechanism for my application. I have read the API description, where it states that one should derive from the abstract Logger class before instantiating the system object. I have done this, I have created a new class which derives from the the Logger class and I have created an object before creating the system object. But when I create the system object I get an assertion from the CEGUISingleton class probably because it tries to create another logger object.
Are there any more steps I need to take before I can redirect the log output?

Kind regards
Martin

Posted: Thu Jan 18, 2007 10:58
by mba
ohhh just saw the release notes for 0.5.X
Added: Abstracted Logger interface to support user created custom loggers. (SF patch #
1414121 by zap)


so its only 0.5.0 that supports this kind of log redirection?
I'm running 0.4.1 so it is probably that what is causing my problems.

Kind regards
Martin

Posted: Tue Feb 06, 2007 09:19
by mba
Jut for future reference.

Upgraded to cegui 0.5.0, derived from the CEGUI::Logger class, implemented the logEvent and setLogFileName methods, and it is working like a charm.