Author Topic: logger plugin? recomended logger?  (Read 5768 times)

Offline WeakPeak

  • Multiple posting newcomer
  • *
  • Posts: 13
logger plugin? recomended logger?
« on: March 02, 2011, 03:12:15 am »
hi is there a loggger that writes log to file as plugin for C::B  or can someone recommend a logger because the std::cout << "may onfo"; isent comftable and for many informationd not realy usefull.

thx in advance

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: logger plugin? recomended logger?
« Reply #1 on: March 02, 2011, 03:50:28 am »
hi is there a loggger that writes log to file as plugin for C::B  or can someone recommend a logger because the std::cout << "may onfo"; isent comftable and for many informationd not realy usefull.

thx in advance
can not under stand your question, but logger did you require? a plugin? can you explain more?
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 WeakPeak

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: logger plugin? recomended logger?
« Reply #2 on: March 02, 2011, 04:56:51 am »
when i write some informations out of my project like

int xyz = 5;
std::cout << \n this is value of variable xyz : " << xyz;

it writes out

 this is value of variable xyz : 5

to the system / console;

i want that to be written into a file so that instead writing std::cout

i implement a logger by

something like


# include "theLogger.h"


theLogger myLog;
myLog.info(" \n this is value of variable xyz : " , xyz) ;

in any common language this type of functionallity is called a logger or Logging Plugin/framework/class.

some SDK´s like eclipse in java has such plugin´s  http://www.ibm.com/developerworks/library/os-eclog/ for example.

thatfor i asked if C::B also offers such a feature or if someone could recommend a logger for c/c++ because the console output is not realy helpfull for larger projects.
« Last Edit: March 02, 2011, 04:58:58 am by WeakPeak »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: logger plugin? recomended logger?
« Reply #3 on: March 02, 2011, 05:48:21 am »
I don't think C::B need this feature. (though I still not understand your feature request)
I think you can implement this feature in your own C++ code, and you can search on google for logger, there are a lot there.

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 WeakPeak

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: logger plugin? recomended logger?
« Reply #4 on: March 02, 2011, 07:57:09 am »
(though I still not understand your feature request)

thats maybe the problem... it is no feature request, it was a simple question if someone could reccomend a logger or if C::B has a ready to work plugin for that without a big set up :), thx anyway


Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: logger plugin? recomended logger?
« Reply #5 on: March 02, 2011, 08:12:00 am »
check out the logging capabilities of the poco framework : http://pocoproject.org/

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: logger plugin? recomended logger?
« Reply #6 on: March 02, 2011, 08:19:44 am »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: logger plugin? recomended logger?
« Reply #7 on: March 02, 2011, 08:35:14 am »
If you use wxWidgets as framework, you can also use the logging capabilities of it: http://docs.wxwidgets.org/stable/wx_wxlogoverview.html#wxlogoverview

But be aware that Code::Blocks is neither a compiler nor a framework ("just" an IDE that works with many compilers) and it can be used with other languages than C/C++ (even if the main focus is there). So an own logging-class does not really make sense.

And writing an own simple text-to-file logger in C++ should not be too hard.