1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
// *****************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 *
// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved *
// *****************************************************************************
#ifndef GENERATE_LOGFILE_H_931726432167489732164
#define GENERATE_LOGFILE_H_931726432167489732164
//#include <chrono>
#include <zen/error_log.h>
//#include "return_codes.h"
#include "status_handler.h"
#include "afs/abstract.h"
namespace fff
{
enum class LogFileFormat
{
html,
text
};
Zstring generateLogFileName(LogFileFormat logFormat, const ProcessSummary& summary);
void saveLogFile(const AbstractPath& logFilePath, //throw FileError, X
const ProcessSummary& summary,
const zen::ErrorLog& log,
int logfilesMaxAgeDays,
LogFileFormat logFormat,
const std::set<AbstractPath>& logsToKeepPaths,
const std::function<void(std::wstring&& msg)>& notifyStatus /*throw X*/);
void sendLogAsEmail(const std::string& email, //throw FileError, X
const ProcessSummary& summary,
const zen::ErrorLog& log,
const AbstractPath& logFilePath,
const std::function<void(std::wstring&& msg)>& notifyStatus /*throw X*/);
}
#endif //GENERATE_LOGFILE_H_931726432167489732164
|