Logging means a I/O operation in some way or another to observe the message. If it's not the disk, it's a buffered stream with a syscall and all kinds of slow. Any other magic (using another thread to do the slow stuff, etc) risks the log message getting lost during a crash and the whole thing being useless.
But the point of logs is to put them in a place where they can be observed. That means I/O pretty much by definition. You might put those logs out to the network, where some dedicated logging machine could handle storing them someplace, but that's still I/O.