[#OSSL_trace_set_callback]
= OSSL&lowbar;trace&lowbar;set&lowbar;callback
:mrdocs:

Enable tracing for `category` by sending output to `callback&period;`

== Synopsis

Declared in `&lt;openssl&sol;trace&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;trace&lowbar;set&lowbar;callback(
    int category,
    xref:OSSL_trace_cb.adoc[OSSL&lowbar;trace&lowbar;cb] callback,
    void* data);
----

== Description

Mutually exclusive with OSSL&lowbar;trace&lowbar;set&lowbar;channel() for the same category&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *category*
| OSSL&lowbar;TRACE&lowbar;CATEGORY&lowbar;&ast; value selecting the channel&period;
| *callback*
| Trace callback, or NULL to disable tracing for `category&period;`
| *data*
| User pointer passed to `callback` on each invocation&period;
|===


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