[#BloombergLP-ball-AsyncFileObserver-setLogFormats]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/AsyncFileObserver.adoc[AsyncFileObserver]::setLogFormats
:relfileprefix: ../../../
:mrdocs:

Set the format specifications for log records written to the log file and to `stdout` to the specified `logFileFormat` and `stdoutFormat`, respectively&period; If the default short output format is currently in effect for logging to `stdout`, this method has the effect of calling `enableStdoutLoggingPrefix` (see that method and `disableStdoutLoggingPrefix`) and setting the format corresponding to enabled `stdout` logging prefix to `stdoutFormat`&period; See &lcub;Log Record Formatting&rcub; for details on the syntax of format specifications&period; Return zero if both formats are valid and have been set&period; Otherwise, if either format is invalid return a non&hyphen;zero value&period; If one of the formats is invalid it will not be set, but the valid format will&period; Note that default formats are in effect following construction until a format&hyphen;setting method is called (&quot;n%d %p&colon;%t %s %f&colon;%l %c %m %un&quot; for both file and `stdout` logging)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
setLogFormats(
    char const* logFileFormat,
    char const* stdoutFormat);
----

== Description

DEPRECATED&colon; Prefer `setFileLogFormat` and `setStdoutLogFormat`&period;


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