At the current time (2021), you would be using DataWeave 2.x and there is a handy log function in the DW library.
You may use it like this:
%dw 2.0
output application/dw
var usermessage = "Bob was here"
---
log ("LOGGEDUSERMESSAGE",usermessage)
The output in the log will look like this:
INFO 2021-04-20 16:20 .... LoggingService$: LOGGEDUSERMESSAGE - "Bob was here"
In application however, log() resolves to the string version of the second argument. Or to say it another way, it passes the second argument along untouched, but it logs both the tag you provide in the first arg separated from the second arg by a dash.
Take note, this is not the logging level. It is an internal tag that the application owner can use to filter log entries.