Skip to content

Commit

Permalink
Fixes alibaba#229
Browse files Browse the repository at this point in the history
  • Loading branch information
hxy1991 committed Dec 5, 2018
1 parent 6deb418 commit 25819dc
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public Slf4jLogger(org.slf4j.Logger delegate) {
activateOptionClass = "com.alibaba.nacos.client.logger.option.Slf4jLog4j2AdapterActivateOption";
}

if (activateOptionClass == null) {
throw new IllegalArgumentException("delegate must be logback impl or slf4j-log4j impl");
}

try {
Class<ActivateOption> clazz = (Class<ActivateOption>)Class.forName(activateOptionClass);
Constructor<ActivateOption> c = clazz.getConstructor(Object.class);
Expand Down

0 comments on commit 25819dc

Please sign in to comment.