You should only be doing this replace if the log level != '_'. This is important because '_' means log() or in other words, don't do print the log level.