string
does this, but the default logging backend should already format expressions this way if you use structured logging:
julia> sig = :(hanoi(from, to, other, count))
:(hanoi(from, to, other, count))
julia> @info "Entering function" signature=sig
┌ Info: Entering function
└ signature = :(hanoi(from, to, other, count))