[#BloombergLP-ball-CstdioObserver-setFormat] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/CstdioObserver.adoc[CstdioObserver]::setFormat :relfileprefix: ../../../ :mrdocs: Set the formatting functor used when writing records to the log of this cstdio observer to a functor created according to the specified, possibly URI‐like, scheme‐tagged `format`. Return zero if the setup with the specified arguments was successful and also save the `format` to be later retrievable using `getFormat`. Otherwise (if no matching scheme could be found or the configuration is invalid) return a non‐zero value and do not change the log record formatter used by this object. Note that a default format ("n%d %p %t %s %f %l %c %m %un") is in effect until this method or `setFormatFunctor` is called. Also, notice that the observer emits newline characters at the beginning and at the end of a log record by (the) default (format), so the user needs to add them explicitly to (text) format strings to preserve that behavior. == Synopsis Declared in `<ball_cstdioobserver.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int setFormat(std::string_view const& format); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#