spdlog-python
spdlog-python copied to clipboard
How to get the file and name of the log line
I want a custome output to get the line and the file of the output log. I tried
logger.set_pattern("[%Y-%m-%d %H:%M:%S.%e] [%n] [%^%l%$] [%@] %v")
However, the [%@] seems not working, I know I can using inspect, but it is not a performant way
I expected to get
[2024-12-30 16:03:42.268] [test] [critical] [your_script.py:123] This is a critical message
But the line and file braket is always empty.