We are using boost log and want to add information about filename and line number to the logging records, similar to this question: boost log to print source code file name and line number. That is not a problem in itself, but there seems to be two alternative solutions: Either using attributes (as in the answer by Guillermo Ruiz) or by adding the information directly to the logging stream with add_value() as shown here.
My question is: What are advantages/disadvantages of the two approaches when it comes to efficiency, threading, etc.? Any recommendations?