Am 25.08.2013 23:41, schrieb Olaf Radicke: > >> Tommi Mäkitalo <[email protected]> hat am 25. August 2013 um 15:21 >> geschrieben: > [...] >> One option is to add a nicer API to configure cxxtools logging. > Yah, let's do it! > > Olaf I'm not convinced, if this is the right way to do it. I really suggest to initialize logging using a configuration file. You have the options to configure it using a properties file or a xml file. For more flexibility you can use a part of a xml file or a part of a json file using the serialization framework.
For verbose output of a command line tool logging is not the right tool for it. I frequently write command line tools, which require a verbose mode. I always define a bool variable and just ask, if it is set before outputting to std::cout. If you use a API you have to specify, which categories log at which level. Also you have to add possibly a file name and configure rolling of the log file. Or configure to log via udp to another host. To do it, you have to maintain some sort of configuration. It is not feasible to feed all that from the command line. So why don't you let cxxtools to do the work to parse the configuration file and configure all that stuff? Tommi ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
