-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
882 additions
and
909 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 11 additions & 9 deletions
20
src/main/java/com/devcycle/sdk/server/common/logging/DevCycleLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,44 @@ | ||
package com.devcycle.sdk.server.common.logging; | ||
|
||
/** | ||
* DevCycleLogger is a simple central entrypoint for the SDK to log messages without pinning the SDK to a | ||
* specific logging framework. By default it logs to stdout but can e overriden by calling setCustomLogger() | ||
*/ | ||
public class DevCycleLogger { | ||
private static IDevCycleLogger logger = new SimpleDevCycleLogger(SimpleDevCycleLogger.Level.INFO); | ||
|
||
public static void setCustomLogger(IDevCycleLogger logger) { | ||
DevCycleLogger.logger = logger; | ||
} | ||
|
||
public static void debug(String message) { | ||
if(logger != null){ | ||
if (logger != null) { | ||
logger.debug(message); | ||
} | ||
} | ||
|
||
public static void info(String message) { | ||
if(logger != null) { | ||
if (logger != null) { | ||
logger.info(message); | ||
} | ||
} | ||
|
||
public static void warning(String message) { | ||
if(logger != null) { | ||
if (logger != null) { | ||
logger.warning(message); | ||
} | ||
} | ||
|
||
public static void error(String message) { | ||
if(logger != null) { | ||
logger.error(message); | ||
} | ||
if (logger != null) { | ||
logger.error(message); | ||
} | ||
} | ||
|
||
public static void error(String message, Throwable t) { | ||
if(logger != null) { | ||
logger.error(message, t); | ||
} | ||
if (logger != null) { | ||
logger.error(message, t); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.