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

Set the format specification for log records written to `stdout`&period;

== Synopsis

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

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

== Description

Set the format specifications for log records written to `stdout` to the `stdoutFormat`&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 the format is valid and the corresponding formatter has been set&period; Otherwise, if the format is invalid, return a non&hyphen;zero value and do not change the formatter&period; Note that default format is 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;

== Return Value

0 if the format is valid, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stdoutFormat*
| format specification for `stdout` records
|===


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