Skip to content
Snippets Groups Projects

Improved scheduling

Merged Olivier BICHLER requested to merge scheduling into dev
3 files
+ 61
22
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -21,6 +21,12 @@
#include "aidge/utils/Attributes.hpp"
namespace Aidge {
/**
* Helper to define a context anywhere, hidding the scoped variable name
* which has no relevance.
*/
#define AIDGE_LOG_CONTEXT(...) const Log::Context logContext_##__LINE__(__VA_ARGS__)
/**
* Aidge logging class, for displaying and file logging of events.
*/
@@ -35,6 +41,18 @@ public:
Fatal
};
class Context {
public:
template <typename... Args>
Context(Args&&... args) {
Log::mContext.push_back(fmt::format(std::forward<Args>(args)...));
}
~Context() {
Log::mContext.pop_back();
}
};
/**
* Detailed messages for debugging purposes, providing information helpful
* for developers to trace and identify issues.
@@ -144,6 +162,7 @@ private:
static Level mFileLevel;
static std::string mFileName;
static std::unique_ptr<FILE, decltype(&std::fclose)> mFile;
static std::vector<std::string> mContext;
};
}
Loading