Define ACTS_LOCAL_LOGGER

Define Documentation

ACTS_LOCAL_LOGGER(log_object)

macro to use a local Acts::Logger object

This macro allows to use a locally defined logging object with the ACTS_* logging macros. The envisaged usage is the following:

Pre

In the current scope, the symbol logger is not yet defined.

Post

The ownership of the given log_object is transferred and log_object should not be used directly any more.

Parameters
  • log_object: logger instance of type

void myFunction() {
   std::unique_ptr<const Acts::Logger> myLogger
       = /* .. your initialization .. */;
   ACTS_LOCAL_LOGGER(std::move(myLogger));

   ACTS_VERBOSE("hello world!");
}