> Tommi Mäkitalo <[email protected]> hat am 27. August 2013 um 22:30 geschrieben:
>
>
> 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!
[...]
> 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?

The point is: I don't like the close relationship between logging and
serialization. If the serialization communicated over a clear API with
logging class than it is no problem.

 
LoggingInfo logConfigInfo = SerializationFactory.getLogingConf( "logging.conf"
);
logConfigInfo.setLevel( LoggingInfo::DEBUG );
logConfigInfo.swichOn( "tntdb" );
logConfigInfo.swichOff( "component_A" );
logger = LogerFactrory( logConfigInfo );

Now it is irrelevant where the data comes:

LoggingInfo logConfigInfo = PersistentDatasBaseAPI:getLogingConf( "psql",
"configs", "debugging_profile" );
logger = LogerFactrory( logConfigInfo );

or

LoggingInfo logConfigInfo = PresidentDatasBaseAPI:getLogingConf( "stage_profile"
);
logger = LogerFactrory( logConfigInfo );

or

LoggingInfo logConfigInfo = CommandLineAPI:getLogingConf( );
logger = LogerFactrory( logConfigInfo );


or

LoggingInfo logConfigInfo = TcpIPAPI:getLogingConf(
"sftp://myFunnyIdea.de/proof_of_concept.conf"; );
logger = LogerFactrory( logConfigInfo );


or

LoggingInfo logConfigInfo = VersionControllAPI:getLogingConf(
"git://myFunnyIdea.de/", "log.config", "test_branch" );
logger = LogerFactrory( logConfigInfo );

or whatever.

Best regards

Olaf


-------------------|-------------------|-------------------|-------------------|

------------------------------------------------------------------------------
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

Reply via email to