Hi all.
Revision 4606 brings you the new shiny LogManager to handle all logging needs. Say bye-bye to MessageManager
.
The most important reason for this change was that it separates the logging from the GUI. If you want to add a logger to the GUI you explicitly do this by sending the (new) cbEVT_ADD_LOG_WINDOW message.
The functions you are used to already are present in the new system: Log(), DebugLog(), LogWarning(), LogError() and friends.
The major difference is that they accept two arguments: a wxString (the message to log) and a LogManager::level (the logging level).
If you want to format a string (like the old functions accepted), use the F function (keep keystrokes to a minimum
). Something like: Manager::Get()->GetLogManager()->Log(F(_T("%d"), 5));
All code in our repository (including contrib plugins) has been accordingly updated (hopefully without mistakes
). It's been tested for a couple of days and seems to work fine. Of course, if any problems pop up they will be dealt as appropriate.
The resume of the above is: everything is converted and works like it used to.
To learn more about the new system, see sdk_event.h for the new logging events, logmanager.h for the new manager, logger.h for the loggers interface and logger
s.h/cpp for the implementation of the standard built-in loggers.
External plugin developers hopefully now know what to expect/fix when they update their working copy of Code::Blocks
.
For any questions/suggestions, just come forth and ask.