Updates from BitShares FC #22

Closed
nathanielhourt wants to merge 693 commits from dapp-support into latest-fc
Showing only changes of commit fa7faee633 - Show all commits

View file

@ -34,20 +34,19 @@ namespace fc {
public: public:
impl( const config& c) : cfg( c ) impl( const config& c) : cfg( c )
{ {
if( cfg.rotate )
{
FC_ASSERT( cfg.rotation_interval >= seconds( 1 ) );
FC_ASSERT( cfg.rotation_limit >= cfg.rotation_interval );
rotate_files( true );
}
try try
{ {
fc::create_directories(cfg.filename.parent_path()); fc::create_directories(cfg.filename.parent_path());
if(!cfg.rotate) if( cfg.rotate )
{
FC_ASSERT( cfg.rotation_interval >= seconds( 1 ) );
FC_ASSERT( cfg.rotation_limit >= cfg.rotation_interval );
rotate_files( true );
} else {
out.open( cfg.filename, std::ios_base::out | std::ios_base::app); out.open( cfg.filename, std::ios_base::out | std::ios_base::app);
}
} }
catch( ... ) catch( ... )
{ {