[Solved] Custom logger

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

[Solved] Custom logger

Postby mba » Tue Jan 16, 2007 12:50

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
Last edited by mba on Tue Feb 06, 2007 09:18, edited 1 time in total.

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Thu Jan 18, 2007 10:58

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

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Tue Feb 06, 2007 09:19

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 29 guests