Skip to content

Commit

Permalink
Switching loggers from commons-logging to slf4j.
Browse files Browse the repository at this point in the history
Purposefully not configuring it for testing.  If we decide to do it,
the lines to add are:
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.6.1</version>
      <scope>test</scope>
    </dependency>
preferably in the root pom and then we need log4j config files.
In the mean time, we are defaulting to the no-op logger.
  • Loading branch information
Chip Pate committed Jan 14, 2011
1 parent cbb4cd0 commit 716add8
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
6 changes: 3 additions & 3 deletions common/src/main/java/org/openrtb/common/model/Signable.java
Expand Up @@ -35,9 +35,9 @@

import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openrtb.common.json.AbstractJsonTranslator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This interface is used to aide in the creation of identifiable/verifiable
Expand All @@ -47,7 +47,7 @@
*/
public abstract class Signable {

private static final Log log = LogFactory.getLog(Signable.class);
private static final Logger log = LoggerFactory.getLogger(Signable.class);

abstract Identification getIdentification();

Expand Down
Expand Up @@ -29,7 +29,8 @@
*/
package org.openrtb.common.json;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.io.IOException;
import java.util.HashMap;
Expand Down
Expand Up @@ -31,7 +31,8 @@
*/
package org.openrtb.common.model;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.junit.Before;
import org.junit.Ignore;
Expand Down
@@ -1,6 +1,8 @@
package org.openrtb.common.util;

import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

Expand Down
Expand Up @@ -34,11 +34,11 @@
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openrtb.common.model.Advertiser;
import org.openrtb.common.model.Blocklist;
import org.openrtb.dsp.intf.service.AdvertiserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This is simply a reference implementation of a static service for testing,
Expand All @@ -50,7 +50,7 @@
public class StaticAdvertiserService extends AbstractStaticService
implements AdvertiserService {

private static final Log log = LogFactory.getLog(StaticAdvertiserService.class);
private static final Logger log = LoggerFactory.getLogger(StaticAdvertiserService.class);

public static List<Advertiser> advertisers = new ArrayList<Advertiser>();
static {
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Expand Up @@ -16,9 +16,9 @@

<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>

<!-- testing dependencies -->
Expand Down
@@ -1,6 +1,6 @@
package org.openrtb.ssp.client;

import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;

import java.util.LinkedList;
import java.util.List;
Expand Down
@@ -1,6 +1,6 @@
package org.openrtb.ssp.core;

import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
import java.util.LinkedList;
Expand Down

0 comments on commit 716add8

Please sign in to comment.