<commit_before>/*
 * Copyright 2011 Metamarkets Group Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.metamx.common.logger;

/**
 */
public class Logger
{
  private final org.apache.log4j.Logger log;

  public Logger(String name)
  {
    log = org.apache.log4j.Logger.getLogger(name);
  }

  public Logger(Class clazz)
  {
    log = org.apache.log4j.Logger.getLogger(clazz);
  }

  public void trace(String message, Object... formatArgs)
  {
    if (log.isTraceEnabled()) {
      log.trace(String.format(message, formatArgs));
    }
  }

  public void trace(Throwable t, String message, Object... formatArgs)
  {
    if (log.isTraceEnabled()) {
      log.trace(String.format(message, formatArgs), t);
    }
  }

  public void debug(String message, Object... formatArgs)
  {
    if (log.isDebugEnabled()) {
      log.debug(String.format(message, formatArgs));
    }
  }

  public void debug(Throwable t, String message, Object... formatArgs)
  {
    if (log.isDebugEnabled()) {
      log.debug(String.format(message, formatArgs), t);
    }
  }

  public void info(String message, Object... formatArgs)
  {
    if (log.isInfoEnabled()) {
      log.info(String.format(message, formatArgs));
    }
  }

  public void info(Throwable t, String message, Object... formatArgs)
  {
    if (log.isInfoEnabled()) {
      log.info(String.format(message, formatArgs), t);
    }
  }

  public void warn(String message, Object... formatArgs)
  {
    log.warn(String.format(message, formatArgs));
  }

  public void warn(Throwable t, String message, Object... formatArgs)
  {
    log.warn(String.format(message, formatArgs), t);
  }

  public void error(String message, Object... formatArgs)
  {
    log.error(String.format(message, formatArgs));
  }

  public void error(Throwable t, String message, Object... formatArgs)
  {
    log.error(String.format(message, formatArgs), t);
  }

  public void fatal(String message, Object... formatArgs)
  {
    log.fatal(String.format(message, formatArgs));
  }

  public void fatal(Throwable t, String message, Object... formatArgs)
  {
    log.fatal(String.format(message, formatArgs), t);
  }

  public void wtf(String message, Object... formatArgs)
  {
    log.error(String.format("WTF?!: " + message, formatArgs), new Exception());
  }

  public void wtf(Throwable t, String message, Object... formatArgs)
  {
    log.error(String.format("WTF?!: " + message, formatArgs), t);
  }<commit_msg>Logger: Remove fatal (for slf4j migration)<commit_after>/*
 * Copyright 2011 Metamarkets Group Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.metamx.common.logger;

/**
 */
public class Logger
{
  private final org.apache.log4j.Logger log;

  public Logger(String name)
  {
    log = org.apache.log4j.Logger.getLogger(name);
  }

  public Logger(Class clazz)
  {
    log = org.apache.log4j.Logger.getLogger(clazz);
  }

  public void trace(String message, Object... formatArgs)
  {
    if (log.isTraceEnabled()) {
      log.trace(String.format(message, formatArgs));
    }
  }

  public void trace(Throwable t, String message, Object... formatArgs)
  {
    if (log.isTraceEnabled()) {
      log.trace(String.format(message, formatArgs), t);
    }
  }

  public void debug(String message, Object... formatArgs)
  {
    if (log.isDebugEnabled()) {
      log.debug(String.format(message, formatArgs));
    }
  }

  public void debug(Throwable t, String message, Object... formatArgs)
  {
    if (log.isDebugEnabled()) {
      log.debug(String.format(message, formatArgs), t);
    }
  }

  public void info(String message, Object... formatArgs)
  {
    if (log.isInfoEnabled()) {
      log.info(String.format(message, formatArgs));
    }
  }

  public void info(Throwable t, String message, Object... formatArgs)
  {
    if (log.isInfoEnabled()) {
      log.info(String.format(message, formatArgs), t);
    }
  }

  public void warn(String message, Object... formatArgs)
  {
    log.warn(String.format(message, formatArgs));
  }

  public void warn(Throwable t, String message, Object... formatArgs)
  {
    log.warn(String.format(message, formatArgs), t);
  }

  public void error(String message, Object... formatArgs)
  {
    log.error(String.format(message, formatArgs));
  }

  public void error(Throwable t, String message, Object... formatArgs)
  {
    log.error(String.format(message, formatArgs), t);
  }

  public void wtf(String message, Object... formatArgs)
  {
    log.error(String.format("WTF?!: " + message, formatArgs), new Exception());
  }

  public void wtf(Throwable t, String message, Object... formatArgs)
  {
    log.error(String.format("WTF?!: " + message, formatArgs), t);
  }
{'fraction_non_alphanumeric': 0.12757346471933836, 'fraction_numerical': 0.004047158191096252, 'mean_word_length': 3.309325246398787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7385639', 'n_tokens_mistral': 1764, 'n_tokens_neox': 1719, 'n_words': 490}