I'm implementing a logger as an aspect using Spring AOP and Log4J, but I've noticed that the class name in log file is always the LoggerAspect
class name, so... is there a way to trace the actual class name in my log?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
this is easier:
Use :
pjp.getTarget().getClass().getCanonicalName()
Also, to add logs at class level of which method is being exexuted instead using logger of advice class, use class level logger within advice method, as below