how to use trace()

I’m trying to figure out how to use trace in my application.
I have added this line in my source file:

trace(USER1_TRACE, TRACE_DEBUG, "trace user1 debug

But where can I see this trace message? (On stdout or on the CLI)?

I have already enabled trace with ‘settrace state=on’ on the CLI but that didn’t help.

#> settrace state=on mask=user1:*

#> 60602:user1:DEBG:trace user1 debug

It works now!