|
|
|
@ -144,6 +144,7 @@ namespace libtorrent
@@ -144,6 +144,7 @@ namespace libtorrent
|
|
|
|
|
logger(std::string const& logpath, std::string const& filename |
|
|
|
|
, int instance, bool append) |
|
|
|
|
{ |
|
|
|
|
/* [MF] log is now in bitcoin
|
|
|
|
|
char log_name[512]; |
|
|
|
|
snprintf(log_name, sizeof(log_name), "libtorrent_logs%d", instance); |
|
|
|
|
std::string dir(complete(combine_path(combine_path(logpath, log_name), filename)) + ".log"); |
|
|
|
@ -151,15 +152,18 @@ namespace libtorrent
@@ -151,15 +152,18 @@ namespace libtorrent
|
|
|
|
|
if (!exists(parent_path(dir))) |
|
|
|
|
create_directories(parent_path(dir), ec); |
|
|
|
|
m_filename = dir; |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
mutex::scoped_lock l(file_mutex); |
|
|
|
|
open(!append); |
|
|
|
|
log_file << "\n\n\n*** starting log ***\n"; |
|
|
|
|
// [MF]
|
|
|
|
|
//open(!append);
|
|
|
|
|
//log_file << "\n\n\n*** starting log ***\n";
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void move_log_file(std::string const& logpath, std::string const& new_name, int instance) |
|
|
|
|
{ |
|
|
|
|
mutex::scoped_lock l(file_mutex); |
|
|
|
|
/*
|
|
|
|
|
if (open_filename == m_filename) |
|
|
|
|
{ |
|
|
|
|
log_file.close(); |
|
|
|
@ -183,6 +187,7 @@ namespace libtorrent
@@ -183,6 +187,7 @@ namespace libtorrent
|
|
|
|
|
, parent_path(dir).c_str(), ec.message().c_str()); |
|
|
|
|
|
|
|
|
|
m_filename = dir; |
|
|
|
|
*/ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if TORRENT_USE_IOSTREAM |
|
|
|
|