Phosphor
|
#include <export.h>
Public Member Functions | |
FileStopCallback (const std::string &_file_path="phosphor.%p.json") | |
void | operator() (TraceLog &log, std::lock_guard< TraceLog > &lh) override |
Protected Member Functions | |
StringPtr | generateFilePathAsPtr () |
Reference callback for saving a buffer to a file if tracing stops.
This saves the buffer to file in the same thread that it is called from so that it may be used after main has returned (e.g. to write everything that a given process has traced when the global TraceLog is destructed).
phosphor::tools::FileStopCallback::FileStopCallback | ( | const std::string & | _file_path = "phosphor.%p.json" | ) |
_file_path | File path to save the buffer to on completion, may accept the wild cards p for PID and d for an ISOish timestamp 'YYYY.MM.DDTHH.MM.SS' |
|
overridevirtual |
Callback method called by TraceLog
log | Reference to the calling TraceLog |
lh | The lock being held when this callback is invoked |
Implements phosphor::TracingStoppedCallback.