plog icon indicating copy to clipboard operation
plog copied to clipboard

how could i output(log) the filename ? by the field m_file of class Record ?

Open yugengde opened this issue 3 years ago • 5 comments

yugengde avatar Feb 21 '22 03:02 yugengde

Yes. There is getFile() method. Use it in your formatter class. Also you need to define PLOG_CAPTURE_FILE to enable capturing of the file names.

SergiusTheBest avatar Feb 21 '22 09:02 SergiusTheBest

I have tried doing that, both the formatter with the getFile() method and the define, but it still comes up as an empty string

ahanin-emerson avatar Jul 06 '22 07:07 ahanin-emerson

@ahanin-emerson Where do you define PLOG_CAPTURE_FILE? It should be defined before including plog headers or it the project settings.

SergiusTheBest avatar Jul 06 '22 09:07 SergiusTheBest

Oh! okay, yes, I defined it after the include and not before, my bad. Thanks for the super quick reply!

ahanin-emerson avatar Jul 06 '22 10:07 ahanin-emerson

@ahanin-emerson No problem!

SergiusTheBest avatar Jul 06 '22 11:07 SergiusTheBest