I am using the following format pattern with the logger: <pattern>%s, %p - %t</pattern>
An example of the output is:
Application::instance().logger().information("Initializing DFT hardware");
Application, Information - Initializing DFT hardware
The %s format causes 'Application' to be printed. This is the the base class that I'm using. I would like to add to this the name of the class where the log command was executed. Is this possible?
The output might look something like:
Application, myClass1, Information - Initializing DFT hardware
Application, myClass2, Information - Initializing more DFT hardware
Would I have to make a separate logger for each class? I hope not. I hope a logger can automatically detect the name of the class.