Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on February 21, 2009, 03:50:51 pm

Title: Where does the DebugLog output?
Post by: ollydbg on February 21, 2009, 03:50:51 pm
I just modify the a plugin and want to logout some information.

But I found that the code below can't log out anything.

Code
Manager::Get()->GetLogManager()->DebugLog(_("XXXXX "));

Though, the code below works

Code
Manager::Get()->GetLogManager()->Log(_("XXXXX "));

So, my question is : Where is DebugLog output?

I read the source code and find that DebugLog() use a debug level variable to control log level. But How can I change this level? (DebugLog internally use Log function to output.)

Code
void DebugLog(const wxString& msg, Logger::level lv = Logger::info) { Log(msg, debug_log, lv); };

Thank you!


Title: Re: Where does the DebugLog output?
Post by: MortenMacFly on February 21, 2009, 04:25:25 pm
So, my question is : Where is DebugLog output?
The debug log is not enabled by default as it is for internal debugging only. To enable the log you have to run C::B with the "--debug-log" command line switch.
Title: Re: Where does the DebugLog output?
Post by: ollydbg on February 21, 2009, 05:03:45 pm
Thank you for your reply.

After running the command " codeblocks.exe --debug-log". A debug output panel added behind the First panel.

By the way, today, I'm reading the codecompletion plugin source. But it is so difficult to understand that I can't find any document.(the CHM file in the BerliOs generated by doxygen were not describing these source code).

Another thing is that there are several functions that is more than 300 lines, I think they should be divided to sub functions.

The most magic and challenge thing is the "SearchTree" structure.

After reading the whole source of this plugin, I'd add some document in the wiki. Thank you!


[attachment deleted by admin]