Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

New log manager since rev. 4606

(1/9) > >>

mandrav:
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 :P). 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 loggers.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.

Howard:
Windows get the following compile errors:

mingw32-g++.exe: .objs\sdk\messagelog.o: No such file or directory
mingw32-g++.exe: .objs\sdk\messagemanager.o: No such file or directory
mingw32-g++.exe: .objs\sdk\simplelistlog.o: No such file or directory
mingw32-g++.exe: .objs\sdk\simpletextlog.o: No such file or directory
Process terminated with status 1 (3 minutes, 23 seconds)
0 errors, 0 warnings
 

Jenna:

--- Quote from: Howard on November 10, 2007, 03:40:01 pm ---Windows get the following compile errors:

mingw32-g++.exe: .objs\sdk\messagelog.o: No such file or directory
mingw32-g++.exe: .objs\sdk\messagemanager.o: No such file or directory
mingw32-g++.exe: .objs\sdk\simplelistlog.o: No such file or directory
mingw32-g++.exe: .objs\sdk\simpletextlog.o: No such file or directory
Process terminated with status 1 (3 minutes, 23 seconds)
0 errors, 0 warnings
 


--- End quote ---
The according .cpp-files are missing from svn-tree.

killerbot:
nonono; these were still in the windows cbp file, fixed now ;-)

killerbot:
note on windows there are still other issues, our don is a linux guy ;-)

EDIT : working on fixing them ...
EDIT : while getting there, my linux build builds ok, but after showing the splash screen the story ends ...
EDIT : windows build fine now , but also crash  (in debugger.dll)

Navigation

[0] Message Index

[#] Next page

Go to full version