Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
[deleted comment]
Perhaps add a small change in class Logger:
---
/opt/Projekty/Google/sms-lib/sms-lib/src/main/java/org/smslib/helper/Logger.java
+++
/opt/Projekty/JBoss/wklaczynski/jboss-sms/sms-lib/src/main/java/org/smslib/helpe
r/Logger.java
@@ -26,13 +26,13 @@
public class Logger
{
- private static final Logger logger = new Logger();
+ private static Logger logger = new Logger();
org.apache.log4j.Logger log4jLogger;
private static final String FQCN = Logger.class.getName();
- private Logger()
+ protected Logger()
{
if (System.getProperties().getProperty("java.vm.name").equalsIgnoreCase("ikvm.net"))
{
@@ -53,9 +53,17 @@
public static Logger getInstance()
{
+ if(Logger.logger == null){
+ Logger.logger = new Logger();
+ }
return Logger.logger;
}
+ public static void setInstance(Logger logger)
+ {
+ Logger.logger = logger;
+ }
+
public void logInfo(String message, Exception e, String gatewayId)
{
if (log4jLogger == null) return;
Original comment by Waldemar.Klaczynski
on 7 Mar 2012 at 7:20
Original comment by T.Delenikas
on 7 Mar 2012 at 9:20
r2331
Original comment by T.Delenikas
on 9 Mar 2012 at 9:08
Original comment by T.Delenikas
on 31 Mar 2012 at 8:03
Original issue reported on code.google.com by
Waldemar.Klaczynski
on 7 Mar 2012 at 7:02