|
|
@ -40,6 +40,7 @@
|
|
|
|
#include <boost/filesystem.hpp>
|
|
|
|
#include <boost/filesystem.hpp>
|
|
|
|
#include <boost/algorithm/string.hpp>
|
|
|
|
#include <boost/algorithm/string.hpp>
|
|
|
|
#include "string_tools.h"
|
|
|
|
#include "string_tools.h"
|
|
|
|
|
|
|
|
#include "misc_os_dependent.h"
|
|
|
|
#include "misc_log_ex.h"
|
|
|
|
#include "misc_log_ex.h"
|
|
|
|
|
|
|
|
|
|
|
|
#undef MONERO_DEFAULT_LOG_CATEGORY
|
|
|
|
#undef MONERO_DEFAULT_LOG_CATEGORY
|
|
|
@ -58,12 +59,7 @@ static std::string generate_log_filename(const char *base)
|
|
|
|
char tmp[200];
|
|
|
|
char tmp[200];
|
|
|
|
struct tm tm;
|
|
|
|
struct tm tm;
|
|
|
|
time_t now = time(NULL);
|
|
|
|
time_t now = time(NULL);
|
|
|
|
if
|
|
|
|
if (!epee::misc_utils::get_gmt_time(now, tm))
|
|
|
|
#ifdef WIN32
|
|
|
|
|
|
|
|
(!gmtime_s(&tm, &now))
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
(!gmtime_r(&now, &tm))
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
snprintf(tmp, sizeof(tmp), "part-%u", ++fallback_counter);
|
|
|
|
snprintf(tmp, sizeof(tmp), "part-%u", ++fallback_counter);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
strftime(tmp, sizeof(tmp), "%Y-%m-%d-%H-%M-%S", &tm);
|
|
|
|
strftime(tmp, sizeof(tmp), "%Y-%m-%d-%H-%M-%S", &tm);
|
|
|
|