Commit 6542e0c7 authored by Martin Marinov's avatar Martin Marinov

Merge remote-tracking branch 'Base/master' into merge-from-ReForm

parents 11d5b5f8 c133e45f
// (C) Copyright 2019 by Autodesk, Inc.
// (C) Copyright 2020 by Autodesk, Inc.
#ifndef BASE_DEBCONFIG_HH_INCLUDED
#define BASE_DEBCONFIG_HH_INCLUDED
......@@ -7,9 +7,10 @@
#include <Base/Config/BaseDefines.hh>
#include <string>
namespace Debug {
namespace Debug
{
void print_char_to_cerr(const char _c); //!< print a char to cerr
void print_char_to_cerr(const char _c); //!< print a char to cerr
/*!
Access the global, per-process, configuration options of the Debug system.
......@@ -38,9 +39,15 @@ public:
//! The deb out log filename, nullptr disables the debug output log file.
const char* log_filename = nullptr;
//! Get if the log file output is enabled
bool logfile() const { return log_filename != nullptr; }
//! Function to deb out on the console, nullptr if output disabled.
print_function console_print = print_char_to_cerr;
//! Get if the console
bool console() const { return console_print != nullptr; }
public:
//! The output level for the given filename and function.
int custom_level(const char* const _flnm, const char* const _fnct) const;
......@@ -73,7 +80,7 @@ private:
Config& operator=(const Config&);
};
};//namespace Debug
}; // namespace Debug
#endif//DEB_ON
#endif//BASE_DEBCONFIG_HH_INCLUDED
#endif // DEB_ON
#endif // BASE_DEBCONFIG_HH_INCLUDED
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment