Author Topic: Where does the DebugLog output?  (Read 3973 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5917
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Where does the DebugLog output?
« 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!


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Where does the DebugLog output?
« Reply #1 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.
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5917
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Where does the DebugLog output?
« Reply #2 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]
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.