[OPINION] Almost all community drivers and apps don't implement logs properly, wasting hub's CPU and Memory

Answering a question I had above, it seems the compiler is smart enough to detect this at compile time. So, I don't really think it's worth worrying about. If you aren't using string interpolation, it will produce just a String anyway, and if you are ... well, presumably you did it for a reason. :slight_smile:

    def s1 = 'test'
    def s2 = "test"
    def s3 = "${s1}"
    [s1, s2, s3].each {
        log.trace getObjectClassName(it)
    }

Log output, newest to oldest (screenshot): GStringImpl, String, String

4 Likes