Author Topic: New log manager since rev. 4606  (Read 29250 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
New log manager since rev. 4606
« on: November 10, 2007, 02:16:45 pm »
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.
Be patient!
This bug will be fixed soon...

Offline Howard

  • Single posting newcomer
  • *
  • Posts: 8
Re: New log manager since rev. 4606
« Reply #1 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
 

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: New log manager since rev. 4606
« Reply #2 on: November 10, 2007, 04:15:07 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
 

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

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: New log manager since rev. 4606
« Reply #3 on: November 10, 2007, 04:19:38 pm »
nonono; these were still in the windows cbp file, fixed now ;-)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: New log manager since rev. 4606
« Reply #4 on: November 10, 2007, 04:25:06 pm »
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)
« Last Edit: November 10, 2007, 05:11:57 pm by killerbot »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: New log manager since rev. 4606
« Reply #5 on: November 10, 2007, 05:33:41 pm »
Quote
nonono; these were still in the windows cbp file, fixed now
Ah, yes, I knew I forgot something :).

Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: New log manager since rev. 4606
« Reply #6 on: November 10, 2007, 05:36:50 pm »
and debugger plug-in crash is also solved

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: New log manager since rev. 4606
« Reply #7 on: November 11, 2007, 07:44:34 pm »
Noticed a crash with he TODO plugin. If you enable to show the plugin in the message panel C::B will crash on startup.

BTW: I'm still in the progress of further removing any links to messagemanager e.g. inside commented code). Will commit possibly tomorrow. ;-)

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jan van den Borst

  • Multiple posting newcomer
  • *
  • Posts: 99
Re: New log manager since rev. 4606
« Reply #8 on: November 11, 2007, 09:41:58 pm »
In the old days warnings showed up blue and errors red in the Build messages and Build log tabs. This is not happening anymore in svn4616. Also the codeblocks config file (default.conf) is incompatible with older versions as the editor disappears in SVN 4616 and is only showed again after deleting the config file.

Jan

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: New log manager since rev. 4606
« Reply #9 on: November 11, 2007, 10:29:22 pm »
Quote
In the old days warnings showed up blue and errors red in the Build messages and Build log tabs.

I can confirm this.
And I also have no longer the codeblocks app log in the messages panel at the bottom; though on linux it is still there.

@Thomas: I think your the guy who can solve this ;-)

In my case no editor disapeared but it have another strange thing, see here : http://forums.codeblocks.org/index.php?topic=7258.msg55406;topicseen#new

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: New log manager since rev. 4606
« Reply #10 on: November 11, 2007, 11:41:42 pm »
Is there a replacement for simpletextlog.h/class SimpleTextLog?

Some plugins like SVNInside use it.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: New log manager since rev. 4606
« Reply #11 on: November 11, 2007, 11:48:02 pm »
Noticed a crash with he TODO plugin. If you enable to show the plugin in the message panel C::B will crash on startup.

BTW: I'm still in the progress of further removing any links to messagemanager e.g. inside commented code). Will commit possibly tomorrow. ;-)

With regards, Morten.

I suggest looking at sdk/config-testsuite.cpp

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: New log manager since rev. 4606
« Reply #12 on: November 12, 2007, 09:03:43 am »
In the old days warnings showed up blue and errors red in the Build messages and Build log tabs. This is not happening anymore in svn4616.

Strange, that's working fine here (linux).

Also the codeblocks config file (default.conf) is incompatible with older versions as the editor disappears in SVN 4616 and is only showed again after deleting the config file.

Jan

This can happen from time to time (when we do such a major change), but you don't have to delete your config file! Just "View->Layouts->Delete current" should be enough...

Is there a replacement for simpletextlog.h/class SimpleTextLog?

Some plugins like SVNInside use it.

Tim S

In loggers.h, among others you will find TextCtrlLogger.
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: New log manager since rev. 4606
« Reply #13 on: November 12, 2007, 09:33:06 am »
In the old days warnings showed up blue and errors red in the Build messages and Build log tabs. This is not happening anymore in svn4616.
Strange, that's working fine here (linux).
Happens here too, though. I assume it is because you don't use the LogManger consequently in the compiler plugin. There is this one function that does some awful tampering with a lot of if()s and stuff to either log something or not, and to write out some HTML to a file.
Don't worry, though. That's easily fixed, and it's not a severe thing, either. I planned a small update to FileLogger anyway, can add a FileLogger that ouputs HTML too then, which should fix the problem. Just don't have time to do anything today, so will be tomorrow.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: New log manager since rev. 4606
« Reply #14 on: November 12, 2007, 10:27:19 am »
Noticed a crash with he TODO plugin. If you enable to show the plugin in the message panel C::B will crash on startup.
Very strange: Here at work it just works. No crash at all...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ