[#BloombergLP-ball-FileObserver2-enableFileLogging-0f6] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FileObserver2.adoc[FileObserver2]::enableFileLogging :relfileprefix: ../../../ :mrdocs: Enable logging of all records published to this file observer to a file whose name is derived from the specified `logFilenamePattern` and append a timestamp to the log filename if the specified `appendTimestampFlag` is `true`. Return 0 on success, a positive value if file logging is already enabled (with no effect), and a negative value otherwise. If the `appendTimestampFlag` is `true` and `logFilenamePattern` does not contain any `%`‐escape sequences, this method behaves as if ".%T" is appended to `logFilenamePattern`. == Synopsis Declared in `<ball_fileobserver2.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int enableFileLogging( char const* logFilenamePattern, bool appendTimestampFlag); ---- == Description DEPRECATED: Use `enableFileLogging(logFilenamePattern)` instead (use the ".%T" pattern to replicate `true == appendTimestampFlag` behavior). [.small]#Created with https://www.mrdocs.com[MrDocs]#