Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into adutra-jansi-enhancements
- Loading branch information
Showing
278 changed files
with
5,372 additions
and
7,306 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
dist: trusty | ||
|
||
language: java | ||
jdk: oraclejdk9 | ||
|
||
jdk: | ||
- oraclejdk11 | ||
|
||
notifications: | ||
email: | ||
- notification@qos.ch | ||
|
||
install: /bin/true | ||
|
||
script: | ||
- mvn clean | ||
- mvn install |
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
18 changes: 18 additions & 0 deletions
18
logback-access/src/main/java/ch/qos/logback/access/model/ConfigurationModel.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ch.qos.logback.access.model; | ||
|
||
import ch.qos.logback.core.model.Model; | ||
|
||
public class ConfigurationModel extends Model { | ||
public static final String INTERNAL_DEBUG_ATTR = "debug"; | ||
|
||
String debug; | ||
|
||
public String getDebug() { | ||
return debug; | ||
} | ||
|
||
public void setDebug(String debug) { | ||
this.debug = debug; | ||
} | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
...access/src/main/java/ch/qos/logback/access/model/processor/ConfigurationModelHandler.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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package ch.qos.logback.access.model.processor; | ||
|
||
import ch.qos.logback.access.model.ConfigurationModel; | ||
import ch.qos.logback.core.Context; | ||
import ch.qos.logback.core.joran.spi.InterpretationContext; | ||
import ch.qos.logback.core.model.Model; | ||
import ch.qos.logback.core.model.processor.ModelHandlerBase; | ||
import ch.qos.logback.core.model.processor.ModelHandlerException; | ||
import ch.qos.logback.core.status.OnConsoleStatusListener; | ||
import ch.qos.logback.core.util.OptionHelper; | ||
import ch.qos.logback.core.util.StatusListenerConfigHelper; | ||
|
||
public class ConfigurationModelHandler extends ModelHandlerBase { | ||
static final String DEBUG_SYSTEM_PROPERTY_KEY = "logback-access.debug"; | ||
|
||
public ConfigurationModelHandler(Context context) { | ||
super(context); | ||
} | ||
|
||
protected Class<ConfigurationModel> getSupportedModelClass() { | ||
return ConfigurationModel.class; | ||
} | ||
|
||
@Override | ||
public void handle(InterpretationContext intercon, Model model) throws ModelHandlerException { | ||
ConfigurationModel configurationModel = (ConfigurationModel) model; | ||
// See LBCLASSIC-225 (the system property is looked up first. Thus, it overrides | ||
// the equivalent property in the config file. This reversal of scope priority | ||
// is justified | ||
// by the use case: the admin trying to chase rogue config file | ||
String debug = System.getProperty(DEBUG_SYSTEM_PROPERTY_KEY); | ||
if (debug == null) { | ||
debug = configurationModel.getDebug(); | ||
} | ||
if (OptionHelper.isNullOrEmpty(debug) || debug.equals("false") || debug.equals("null")) { | ||
addInfo(ConfigurationModel.INTERNAL_DEBUG_ATTR + " attribute not set"); | ||
} else { | ||
StatusListenerConfigHelper.addOnConsoleListenerInstance(context, new OnConsoleStatusListener()); | ||
} | ||
|
||
} | ||
} |
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
Oops, something went wrong.