File tree Expand file tree Collapse file tree
jooby/src/main/java/org/jooby Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3198,12 +3198,7 @@ static String logback(final Config conf) {
31983198 logback = conf .getString ("logback.configurationFile" );
31993199 } else {
32003200 String env = conf .hasPath ("application.env" ) ? conf .getString ("application.env" ) : null ;
3201- if (env != null ) {
3202- URL classpathLogback = Thread .currentThread ().getContextClassLoader ().getResource ("logback." + env + ".xml" );
3203- if (classpathLogback != null ) {
3204- return classpathLogback .toString ();
3205- }
3206- }
3201+ URL cpconf = Thread .currentThread ().getContextClassLoader ().getResource ("logback." + env + ".xml" );
32073202 ImmutableList .Builder <File > files = ImmutableList .builder ();
32083203 File userdir = new File (System .getProperty ("user.dir" ));
32093204 File confdir = new File (userdir , "conf" );
@@ -3218,7 +3213,7 @@ static String logback(final Config conf) {
32183213 .filter (f -> f .exists ())
32193214 .map (f -> f .getAbsolutePath ())
32203215 .findFirst ()
3221- .orElse ("logback.xml" );
3216+ .orElse (( cpconf != null ) ? cpconf . toString () : "logback.xml" );
32223217 }
32233218 return logback ;
32243219 }
You can’t perform that action at this time.
0 commit comments