Merge branch 'master' of github.com:BitShares/fc

This commit is contained in:
Daniel Larimer 2015-03-26 16:51:15 -04:00
commit 41fedc14f3
2 changed files with 6 additions and 8 deletions

View file

@ -14,12 +14,11 @@ class file_appender : public appender {
fc::string format;
fc::path filename;
bool flush;
bool truncate;
bool rotate;
bool flush = true;
bool rotate = false;
microseconds rotation_interval;
microseconds rotation_limit;
bool rotation_compression;
bool rotation_compression = false;
};
file_appender( const variant& args );
~file_appender();
@ -33,4 +32,4 @@ class file_appender : public appender {
#include <fc/reflect/reflect.hpp>
FC_REFLECT( fc::file_appender::config,
(format)(filename)(flush)(truncate)(rotate)(rotation_interval)(rotation_limit)(rotation_compression) )
(format)(filename)(flush)(rotate)(rotation_interval)(rotation_limit)(rotation_compression) )

View file

@ -107,8 +107,8 @@ namespace fc {
}
remove_all(link_filename); // on windows, you can't delete the link while the underlying file is opened for writing
out.open( log_filename );
create_hard_link(log_filename, link_filename);
}
create_hard_link(log_filename, link_filename);
/* Delete old log files */
fc::time_point limit_time = now - cfg.rotation_limit;
@ -160,9 +160,8 @@ namespace fc {
format( "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}] ${message}" ),
filename(p),
flush(true),
truncate(true),
rotate(false),
rotation_compression(true)
rotation_compression(false)
{}
file_appender::file_appender( const variant& args ) :