|
|
|
|
@ -191,29 +191,29 @@ namespace log_internal
|
|
|
|
|
* @brief Internal helper to set an output stream to direct logging to.
|
|
|
|
|
* @param stream
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API void SetInternalOutputStream(std::ostream& stream);
|
|
|
|
|
extern DVM_COMMON_API void SetInternalOutputStream(std::ostream& stream);
|
|
|
|
|
/**
|
|
|
|
|
* @brief Writes a new entry to the diagnostics log.
|
|
|
|
|
* @param level Log level for entry.
|
|
|
|
|
* @param log Fully formatted log message.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API void LogInternal(uint32_t level, const std::string& log);
|
|
|
|
|
extern DVM_COMMON_API void LogInternal(uint32_t level, const std::string& log);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Internal helper to get the log file path.
|
|
|
|
|
* @returns std::string Configured log file path.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API std::string GetLogFilePath();
|
|
|
|
|
extern DVM_COMMON_API std::string GetLogFilePath();
|
|
|
|
|
/**
|
|
|
|
|
* @brief Internal helper to get the log file root name.
|
|
|
|
|
* @returns std::string Configured log file root name.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API std::string GetLogFileRoot();
|
|
|
|
|
extern DVM_COMMON_API std::string GetLogFileRoot();
|
|
|
|
|
/**
|
|
|
|
|
* @brief Internal helper to get the log file handle pointer.
|
|
|
|
|
* @returns FILE* Pointer to the open log file.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API FILE* GetLogFile();
|
|
|
|
|
extern DVM_COMMON_API FILE* GetLogFile();
|
|
|
|
|
} // namespace log_internal
|
|
|
|
|
|
|
|
|
|
namespace log_stacktrace
|
|
|
|
|
@ -228,7 +228,7 @@ namespace log_stacktrace
|
|
|
|
|
* @brief Backward backtrace signal handling class.
|
|
|
|
|
* @ingroup logger
|
|
|
|
|
*/
|
|
|
|
|
class HOST_SW_API SignalHandling {
|
|
|
|
|
class DVM_COMMON_API SignalHandling {
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* @brief Helper to generate a default list of POSIX signals to handle.
|
|
|
|
|
@ -440,7 +440,7 @@ namespace log_stacktrace
|
|
|
|
|
* @brief Backward backtrace signal handling class.
|
|
|
|
|
* @ingroup logger
|
|
|
|
|
*/
|
|
|
|
|
class HOST_SW_API SignalHandling {
|
|
|
|
|
class DVM_COMMON_API SignalHandling {
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* @brief Initializes a new instance of the SignalHandling class
|
|
|
|
|
@ -724,7 +724,7 @@ namespace log_stacktrace
|
|
|
|
|
* @brief Backward backtrace signal handling class.
|
|
|
|
|
* @ingroup logger
|
|
|
|
|
*/
|
|
|
|
|
class HOST_SW_API SignalHandling {
|
|
|
|
|
class DVM_COMMON_API SignalHandling {
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* @brief Initializes a new instance of the SignalHandling class
|
|
|
|
|
@ -756,29 +756,29 @@ namespace log_stacktrace
|
|
|
|
|
* @brief Helper to get the current log file level.
|
|
|
|
|
* @returns uint32_t Current log file level.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API uint32_t CurrentLogFileLevel();
|
|
|
|
|
extern DVM_COMMON_API uint32_t CurrentLogFileLevel();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Helper to get the current log file path.
|
|
|
|
|
* @returns std::string Current log file path.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API std::string LogGetFilePath();
|
|
|
|
|
extern DVM_COMMON_API std::string LogGetFilePath();
|
|
|
|
|
/**
|
|
|
|
|
* @brief Helper to get the current log file root.
|
|
|
|
|
* @returns std::string Current log file root.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API std::string LogGetFileRoot();
|
|
|
|
|
extern DVM_COMMON_API std::string LogGetFileRoot();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Gets the instance of the Network class to transfer the activity log with.
|
|
|
|
|
* @returns void*
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API void* LogGetNetwork();
|
|
|
|
|
extern DVM_COMMON_API void* LogGetNetwork();
|
|
|
|
|
/**
|
|
|
|
|
* @brief Sets the instance of the Network class to transfer the activity log with.
|
|
|
|
|
* @param network
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API void LogSetNetwork(void* network);
|
|
|
|
|
extern DVM_COMMON_API void LogSetNetwork(void* network);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Initializes the diagnostics log.
|
|
|
|
|
@ -790,12 +790,12 @@ extern HOST_SW_API void LogSetNetwork(void* network);
|
|
|
|
|
* @param syslog Flag indicating whether or not logs will be sent to syslog.
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API bool LogInitialise(const std::string& filePath, const std::string& fileRoot,
|
|
|
|
|
extern DVM_COMMON_API bool LogInitialise(const std::string& filePath, const std::string& fileRoot,
|
|
|
|
|
uint32_t fileLevel, uint32_t displayLevel, bool disableTimeDisplay = false, bool useSyslog = false);
|
|
|
|
|
/**
|
|
|
|
|
* @brief Finalizes the diagnostics log.
|
|
|
|
|
*/
|
|
|
|
|
extern HOST_SW_API void LogFinalise();
|
|
|
|
|
extern DVM_COMMON_API void LogFinalise();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Writes a new entry to the diagnostics log.
|
|
|
|
|
@ -806,7 +806,7 @@ extern HOST_SW_API void LogFinalise();
|
|
|
|
|
* This is a variable argument function. This shouldn't be called directly, utilize the LogXXXX macros above, instead.
|
|
|
|
|
*/
|
|
|
|
|
template<typename ... Args>
|
|
|
|
|
HOST_SW_API void Log(uint32_t level, log_internal::SourceLocation sourceLoc, const std::string& fmt, Args... args)
|
|
|
|
|
DVM_COMMON_API void Log(uint32_t level, log_internal::SourceLocation sourceLoc, const std::string& fmt, Args... args)
|
|
|
|
|
{
|
|
|
|
|
using namespace log_internal;
|
|
|
|
|
|
|
|
|
|
|