[#BloombergLP-balm-MetricsManager-addGeneralPublisher]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]::addGeneralPublisher
:relfileprefix: ../../../
:mrdocs:

Add a publisher used for every category published by this manager&period;

== Synopsis

Declared in `&lt;balm&lowbar;metricsmanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
addGeneralPublisher(xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;Publisher&gt;] const& publisher);
----

== Description

Add the specified `publisher` to the set of publishers that will be used to propagate records for _every_ category published by this metrics manager&period; Return 0 on success, and a non&hyphen;zero value with no effect if `publisher` has already been registered&period; After this method returns, _any_ category published by this metrics manager will be published to `publisher`&period; Note that this method will have no effect and return a non&hyphen;zero value if `publisher` was previously registered for one or more specific categories (using the alternative `addSpecificPublisher` method)&period;

== Return Value

0 on success, and a non&hyphen;zero value with no effect if `publisher` has already been registered

== Parameters

[cols="1,4"]
|===
| Name| Description
| *publisher*
| publisher to register for every category
|===


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