[#BloombergLP-ball-FileObserver-enableFileLogging-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FileObserver.adoc[FileObserver]::enableFileLogging
:relfileprefix: ../../../
:mrdocs:

`enableFileLogging` overloads

== Synopses

Declared in `&lt;ball&lowbar;fileobserver&period;h&gt;`

Enable file logging using a name derived from `logFilenamePattern`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/ball/FileObserver/enableFileLogging-03.adoc[enableFileLogging](char const* logFilenamePattern);
----

[.small]#xref:BloombergLP/ball/FileObserver/enableFileLogging-03.adoc[_» more&period;&period;&period;_]#

Enable file logging, optionally appending a timestamp to the name&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/ball/FileObserver/enableFileLogging-00.adoc[enableFileLogging](
    char const* logFilenamePattern,
    bool appendTimestampFlag);
----

[.small]#xref:BloombergLP/ball/FileObserver/enableFileLogging-00.adoc[_» more&period;&period;&period;_]#

== Return Value

0 on success, positive if already enabled, negative on error

== Parameters

[cols="1,4"]
|===
| Name| Description
| *logFilenamePattern*
| filename pattern, possibly with `%`&hyphen;escapes
| *appendTimestampFlag*
| whether to append a timestamp to the filename
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
