Skip to content

Commit

Permalink
adding logging support to pubnub cn1 lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Devendra committed Jul 4, 2013
1 parent 948ea93 commit b70deac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
Binary file modified codenameone/pubnub-codenameone-3.5.2.cn1lib
Binary file not shown.
44 changes: 25 additions & 19 deletions codenameone/src/com/pubnub/api/Logger.java
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
package com.pubnub.api;

//import org.slf4j.LoggerFactory;
import com.codename1.io.Log;

class Cn1Logger {

public Cn1Logger(Class c) {

}
public void debug(String s) {

}
public void trace(String s) {

}
public void error(String s) {

}
public void info(String s) {

}
}

private Log log;

public Cn1Logger(Class c) {
Log log = Log.getInstance();
}

public void debug(String s) {
log.p(s, Log.DEBUG);
}

public void trace(String s) {
log.p(s,Log.INFO);
}

public void error(String s) {
log.p(s,Log.ERROR);
}

public void info(String s) {
log.p(s,Log.INFO);
}
}

class Logger extends AbstractLogger {

private Class _class;
private Cn1Logger log;

public Logger(Class _class) {
this._class = _class;
this.log = new Cn1Logger(this._class);
this.log = null;
}

@Override
Expand Down

0 comments on commit b70deac

Please sign in to comment.