I'm trying to print the name of the current class in Swift. More specifically, I'd like achieve the following output:
myFunction() in ClassContainingTheFunction
I have the function name printing fine. This is the closest I've came to printing the class name along with the function name:
println("\(__FUNCTION__) in \(__FILE__)")
prints
myFunction() in path/to/TheFile.swift
and
println("\(__FUNCTION__) in \(object_getClassName(self))")
prints
myFunction() in [mangled class name here]
Both of these are close to what I want, but the path is long, and the mangled class name can be very unreadable compared to the name I see in code.