changed log() to check for loggers