For extreme logging.

@param logger  Logger to trace mutations to.
197859
public void traceMutations(Logger logger) {
        logger.debug("Transaction in " + getTenant().getName() + ": " + getMutationsCount() + " mutations");
        for(ColumnUpdate mutation: getColumnUpdates()) {
            logger.trace(mutation.toString());
        }
        //2. delete columns
        for(ColumnDelete mutation: getColumnDeletes()) {
            logger.trace(mutation.toString());
        }
        //3. delete rows
        for(RowDelete mutation: getRowDeletes()) {
            logger.trace(mutation.toString());
        }
    }
848065
public function log( \Monolog\Logger $logger) {
        $reflection = new \ReflectionClass($this);
        $logger->error($this->getMessage(), [
            'type' => $reflection->getShortName(),
            'code' => $this->getCode(),
            'line' => $this->getLine(),
            'file' => $this->getFile(),
            'trace' => $this->getTrace(),
            'context' => $this->getContext()
        ]);
    }
536967
public static void logThreads(final Logger logger, final Level level, final String prefix) {
    logThreads(logger, level, prefix, "\n\t", "\n\t\t");
  }
267224
public function setLogger(LoggerInterface $logger):void{
		$this->logger = $logger;
		$this->driver->setLogger($logger);
		$this->query->setLogger($logger);
	}
737000
public static void logIfUnexpected(Logger logger, Channel ch, String debugData, Throwable cause) {

        if (!logger.isWarnEnabled() || isExpected(cause)) {
            return;
        }

        logger.warn("{} Unexpected exception: {}", ch, debugData, cause);
    }
1018243
private void resetLogger(Logger logger) {
        // Close all the Logger's handlers.
        Handler[] targets = logger.getHandlers();
        for (int i = 0; i < targets.length; i++) {
            Handler h = targets[i];
            logger.removeHandler(h);
            try {
                h.close();
            } catch (Exception ex) {
                // Problems closing a handler?  Keep going...
            }
        }
        String name = logger.getName();
        if (name != null && name.equals("")) {
            // This is the root logger.
            logger.setLevel(defaultLevel);
        } else {
            logger.setLevel(null);
        }
    }
1035442
private static void writeToLog(Logger logger, Level level, String pattern, Exception exception) {
    if (level == Level.ERROR) {
      logger.error(pattern, exception);
    } else if (level == Level.INFO) {
      logger.info(pattern);
    } else if (level == Level.DEBUG) {
      logger.debug(pattern);
    }
  }
961336
public function setLogger($logger)
    {
        if (!method_exists($logger, 'info'))
        {
            throw new Exception('logger need have method "info($message)"');
        }
        if (!method_exists($logger, 'error'))
        {
            throw new Exception('logger need have method "error($message)"');
        }
        $this->logger = $logger;
    }
1106291
public static void logUncaughtExceptions(Logging logger) {
    try {
      Thread.setDefaultUncaughtExceptionHandler((t, e) -> logger.exception(e));
    }
    catch(SecurityException e) {
      logger.warning("Could not set the Default Uncaught Exception Handler", e);
    }
  }
1009273
def removeLogger(self, logger):
        
        if isinstance(logger, logging.Logger):
            logger = logger.name
        
        if logger in self._loggers:
            self._loggers.remove(logger)
            if logger == 'root':
                logger = logging.getLogger()
            else:
                logger = logging.getLogger(logger)
            
            logger.removeHandler(self.handler())
178851
public static void logFileCreation(final Logger logger, final String path)
	{

		logger.logMessage(Level.INFO, "New File created:\t" + path);
	}
1260010
def setup_logger(logger=None, level='INFO'):
    
    if not logger:  # if no logger exists, make one
        logger = logging.getLogger()

    if not logger.handlers:  # setup logger handlers
        channel = logging.StreamHandler()
        channel.setFormatter(log.DebugLogFormatter())

        # channel.setFormatter(log.LogFormatter())
        logger.setLevel(level)
        logger.addHandler(channel)
606060
function ExceptionReporter(logger, level) {
    this.logger = logger;
    this.level = level || new Level('UNCAUGHT EXCEPTION', Infinity);
    this.exceptionHandler = this.onUncaughtException.bind(this);
}
785462
public static void log(Logger logger, ILoggingEvent event)
    {
        ((ch.qos.logback.classic.Logger) logger).callAppenders(event);
    }
745504
public void log(Logger targetLogger)
    {
        Object[] argumentArray = getArgumentArray();
        if (getArgumentArray() == null) {
            log(targetLogger, getLevel(), getMarker(), getMessage(), getThrowable());
        } else {
            if (getThrowable() != null) {
                argumentArray = ArrayUtils.add(getArgumentArray(), getThrowable());
            }

            log(targetLogger, getLevel(), getMarker(), getMessage(), argumentArray);
        }
    }
718641
def set_logger(self, logger):
        
        self.__logger = logger
        self.session.set_logger(self.__logger)
680052
public static void printDebugStackTrace(TraceComponent logger, Throwable t,
                                            String message) {
        if (logger.isDebugEnabled()) {
            chTrace.traceDebugStack(logger, t, message);
        }
    }