logs the message to joblog and trace.
Joblog and trace.log messages will be logged as per supplied logging level
514261
@Trivial
	public static void logToJobLogAndTrace(Level level, String msg, Object[] params, Logger traceLogger){
		String formattedMsg = getFormattedMessage(msg, params, "Job event.");
		logRawMsgToJobLogAndTrace(level, formattedMsg, traceLogger);
	}
158509
def main():
    """"""
    formatter = ColoredFormatter(log_colors={'TRACE': 'yellow'})

    handler = logging.StreamHandler()
    handler.setFormatter(formatter)

    logger = logging.getLogger('example')
    logger.addHandler(handler)
    logger.setLevel('TRACE')

    logger.log(5, 'a message using a custom level')
585129
public void trace(String loggerFqcn, Object message, Object[] params, Throwable t) {
        doLog(Level.TRACE, loggerFqcn, message, params, t);
    }
1130013
public static void log(Logger logger,
                           Level level,
                           String message,
                           Object parameter) {
        log(logger, level, message, new Object[] { parameter });
    }
199594
protected static void log(Level level, Object message, Throwable throwable, Object... args) {
		Message payload = payload(message, args, throwable);
		payload.getFormattedMessage(); // preformat message (cached), so formating has processed and added fields to MetaContext
		if (MetaContext.hasMeta()) {
			// serialize metacontext map to json, which is put into a designated threadcontext field
			ThreadContext.put(JSON_FIELD, MetaContext.toJson());
			MetaContext.clear();
		}
		determineLogger().log(level, payload, payload.getThrowable());
		if (ThreadContext.getContext() != null && ThreadContext.containsKey(JSON_FIELD)) {
			ThreadContext.remove(JSON_FIELD);
		}
	}
479059
def log(msg, level=0):
    '''
    
    '''

    red = '\033[91m'
    endc = '\033[0m'

    # configure the logging module
    cfg = {
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'stdout': {
                'format': '[%(levelname)s]: %(asctime)s - %(message)s',
                'datefmt': '%x %X'
            },
            'stderr': {
                'format': red + '[%(levelname)s]: %(asctime)s - %(message)s' + endc,
                'datefmt': '%x %X'
            }
        },
        'handlers': {
            'stdout': {
                'class': 'logging.StreamHandler',
                'level': 'DEBUG',
                'formatter': 'stdout'
            },
            'stderr': {
                'class': 'logging.StreamHandler',
                'level': 'ERROR',
                'formatter': 'stderr'
            }
        },
        'loggers': {
            'info': {
                'handlers': ['stdout'],
                'level': 'INFO',
                'propagate': True
            },
            'error': {
                'handlers': ['stderr'],
                'level': 'ERROR',
                'propagate': False
            }
        }
    }

    dictConfig(cfg)

    lg = 'info' if level == 0 else 'error'
    lvl = 20 if level == 0 else 40

    logger = logging.getLogger(lg)
    logger.log(lvl, msg)
699168
def log(self, msg, level=INFO):
        
        logger.log(level, '<{}> - '.format(self._name) + msg)
459050
def _init_log(level=logging.DEBUG):
    
    log = logging.getLogger(__file__)
    log.setLevel(level)
    handler = logging.StreamHandler(sys.stdout)
    handler.setLevel(level)
    formatter = logging.Formatter('%(asctime)s: %(message)s',
                                  '%Y/%m/%d-%H:%M:%S')
    handler.setFormatter(formatter)
    log.addHandler(handler)
    return log
600350
def stdout_logging(loglevel=logging.INFO):
    
    logformat = "[%(asctime)s] %(levelname)s:%(name)s:%(lineno)d: %(message)s"

    logging.config.dictConfig(level=loglevel, stream=sys.stdout,
                              format=logformat, datefmt="%Y-%m-%d %H:%M:%S")
1326150
public void log(final String _message,
                    final int _level)
    {
        switch (_level)  {
            case 4:
                if (IvyOverSLF4JLogger.LOG.isDebugEnabled())  {
                    IvyOverSLF4JLogger.LOG.debug(_message);
                }
                break;
            case 3:
                if (IvyOverSLF4JLogger.LOG.isWarnEnabled())  {
                    IvyOverSLF4JLogger.LOG.warn(_message);
                }
                break;
            case 2:
                if (IvyOverSLF4JLogger.LOG.isInfoEnabled())  {
                    IvyOverSLF4JLogger.LOG.info(_message);
                }
                break;
            case 1:
                if (IvyOverSLF4JLogger.LOG.isErrorEnabled())  {
                    IvyOverSLF4JLogger.LOG.error(_message);
                }
                break;
            default:
                IvyOverSLF4JLogger.LOG.error("unknown log level " + _level);
                IvyOverSLF4JLogger.LOG.error(_message);
        }
    }
887417
def setup_logging(level):
    
    format = "[%(asctime)s] %(levelname)s:%(name)s:%(message)s"
    logging.basicConfig(
        level=level, stream=sys.stdout, format=format, datefmt="%Y-%m-%d %H:%M:%S"
    )
329873
def log(self, level, *args, **kwargs):
        
        target = getattr(self.__logger, level)
        target(*args, **kwargs)
193344
protected void traceJobXML(String jobXML) {

        if (logger.isLoggable(Level.FINE)) {
            int concatLen = jobXML.length() > 200 ? 200 : jobXML.length();
            logger.fine("Starting job: " + jobXML.substring(0, concatLen) + "... truncated ...");
        }
    }
1332814
def log(self, level, *msg_elements):
    """"""
    self.report.log(self._threadlocal.current_workunit, level, *msg_elements)
416912
public void log(Level level, String message, Object... args) {
      if (logger.isLoggable(level)) {
         String errorMessage = "";
         Throwable thrown = null;
         Object[] params = null;

         if (args == null || args.length == 0) {
            errorMessage = message;
         } else if (args[0] instanceof Throwable) {
            thrown = (Throwable) args[0];
            if (args.length > 1) {
               params = new Object[args.length - 1];
               System.arraycopy(args, 1, params, 0, args.length - 1);
            }
         } else if (args[args.length - 1] instanceof Throwable) {
            params = new Object[args.length - 1];
            System.arraycopy(args, 0, params, 0, args.length - 1);
            thrown = (Throwable) args[args.length - 1];
         } else {
            params = new Object[args.length];
            System.arraycopy(args, 0, params, 0, args.length);
         }

         if (params != null) {
            errorMessage = MessageFormat.format(message, params);
         }

         LogRecord record = new LogRecord(level, errorMessage);
         record.setLoggerName(logger.getName());
         record.setThrown(thrown);
         record.setParameters(args);
         logger.log(record);
      }
   }
180735
function log(level, message, stackLevel) {
  //	util.log("log: " + level + " : " + message);		
  var index = log_types.indexOf(level);
  if (index <= log_level) {
//    console.log( typeof message)
    if (typeof message !== 'string') {
      if( message instanceof Error) {
        message = message.toString();
      } else {
        message = JSON.stringify(message);
      }
    }

    if (index == 1) message = "*** " + message;

    if (__stack) {
      var ref = __stack[2];
      var line = ref.getLineNumber();
      var name = ref.getFileName().replace(process.cwd() + '/', '');
      message = "(" + name + ":" + line + "): " + message;

    }

    util.log(log_labels[index] + ' ' + message);
  }
}
219710
def log(messages, event = :debug, level = event)
      if self.is_a?(Cinch::Plugin)
        messages = Array(messages).map {|m|
          "[#{self.class}] " + m
        }
      end
      @bot.loggers.log(messages, event, level)
    end