[#OSSL_trace_set_channel]
= OSSL&lowbar;trace&lowbar;set&lowbar;channel
:mrdocs:

Attach a BIO as the simple trace channel for `category` (ownership transfers on success)&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;channel(
    int category,
    xref:BIO.adoc[BIO]* channel);
----

== Description

Mutually exclusive with OSSL&lowbar;trace&lowbar;set&lowbar;callback() 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;
| *channel*
| Sink BIO for trace output, or NULL to disable tracing for `category&period;`
|===


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