Apply suggestions from code review
Co-authored-by: cebtenzzre <cebtenzzre@gmail.com>
This commit is contained in:
parent
1fcb8139f6
commit
c3b7c0e19c
1 changed files with 6 additions and 6 deletions
|
@ -326,9 +326,9 @@ inline std::string log_filename_generator_impl(LogTriState multilog, const std::
|
||||||
// INTERNAL, DO NOT USE
|
// INTERNAL, DO NOT USE
|
||||||
inline FILE *log_handler1_impl(bool change = false, LogTriState append = LogTriStateSame, LogTriState disable = LogTriStateSame, const std::string & filename = LOG_DEFAULT_FILE_NAME, FILE *target = nullptr)
|
inline FILE *log_handler1_impl(bool change = false, LogTriState append = LogTriStateSame, LogTriState disable = LogTriStateSame, const std::string & filename = LOG_DEFAULT_FILE_NAME, FILE *target = nullptr)
|
||||||
{
|
{
|
||||||
static bool _initialized{false};
|
static bool _initialized = false;
|
||||||
static bool _append{false};
|
static bool _append = false;
|
||||||
static bool _disabled{(filename.empty() && target == nullptr)};
|
static bool _disabled = filename.empty() && target == nullptr;
|
||||||
static std::string log_current_filename{filename};
|
static std::string log_current_filename{filename};
|
||||||
static FILE *log_current_target{target};
|
static FILE *log_current_target{target};
|
||||||
static FILE *logfile = nullptr;
|
static FILE *logfile = nullptr;
|
||||||
|
@ -451,7 +451,7 @@ inline FILE *log_handler() { return log_handler1_impl(); }
|
||||||
|
|
||||||
// Enable or disable creating separate log files for each run.
|
// Enable or disable creating separate log files for each run.
|
||||||
// can ONLY be invoked BEFORE first log use.
|
// can ONLY be invoked BEFORE first log use.
|
||||||
#define log_multilog(enable) log_filename_generator_impl(enable ? LogTriStateTrue : LogTriStateFalse, "", "")
|
#define log_multilog(enable) log_filename_generator_impl((enable) ? LogTriStateTrue : LogTriStateFalse, "", "")
|
||||||
// Enable or disable append mode for log file.
|
// Enable or disable append mode for log file.
|
||||||
// can ONLY be invoked BEFORE first log use.
|
// can ONLY be invoked BEFORE first log use.
|
||||||
#define log_append(enable) log_append_impl(enable)
|
#define log_append(enable) log_append_impl(enable)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue