[JBoss JIRA] (LOGMGR-52) Add option to WriterHandler to collapse repeated messages
by James Perkins (JIRA)
[ https://issues.jboss.org/browse/LOGMGR-52?page=com.atlassian.jira.plugin.... ]
James Perkins updated LOGMGR-52:
--------------------------------
Fix Version/s: 2.1.3.Final
(was: 2.1.2.Final)
> Add option to WriterHandler to collapse repeated messages
> ---------------------------------------------------------
>
> Key: LOGMGR-52
> URL: https://issues.jboss.org/browse/LOGMGR-52
> Project: JBoss Log Manager
> Issue Type: Feature Request
> Reporter: David Lloyd
> Assignee: David Lloyd
> Fix For: 2.1.3.Final
>
>
> The WriterHandler could have a time interval configured wherein a repeated message would be collapsed.
> The last message would be stored in a field for comparison along with a nanoTime tag (the timestamp on the message is not adequate because the clock can have skew or be reset completely at any time). If the current message string equals the last message string, and collapsing is enabled, then instead of logging the message, a count is incremented. If the current message is not equal, then the stored message is logged with a tag indicating the number of repeats (i18n?) and then the next submitted message is logged.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFCORE-3799) FIPS mode is not detected correctly on JDK 8
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3799?page=com.atlassian.jira.plugi... ]
Darran Lofthouse updated WFCORE-3799:
-------------------------------------
Fix Version/s: 5.0.0.Beta1
> FIPS mode is not detected correctly on JDK 8
> --------------------------------------------
>
> Key: WFCORE-3799
> URL: https://issues.jboss.org/browse/WFCORE-3799
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Affects Versions: 5.0.0.Alpha4
> Environment: jdk 8
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Priority: Blocker
> Fix For: 5.0.0.Beta1
>
>
> Trying SSL in FIPS mode I get "KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used"
> {code}
> 17:45:32,678 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service org.wildfly.security.ssl-context.server-ssl-context: org.jboss.msc.service.StartException in service org.wildfly.security.ssl-context.server-ssl-context: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> at org.wildfly.extension.elytron.SSLDefinitions$6.lambda$getValueSupplier$1(SSLDefinitions.java:926)
> at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
> at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> at sun.security.ssl.SSLContextImpl.chooseKeyManager(SSLContextImpl.java:149)
> at sun.security.ssl.SSLContextImpl.engineInit(SSLContextImpl.java:66)
> at javax.net.ssl.SSLContext.init(SSLContext.java:282)
> at org.wildfly.security.ssl.SSLContextBuilder.lambda$build$0(SSLContextBuilder.java:372)
> at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:53)
> at org.wildfly.extension.elytron.SSLDefinitions$6.lambda$getValueSupplier$1(SSLDefinitions.java:924)
> ... 9 more
> 17:45:32,686 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("server-ssl-context" => "server-ssl-context")
> ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.ssl-context.server-ssl-context" => "java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> Caused by: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used"}}
> {code}
> https://github.com/wildfly/wildfly-core/blob/02e2de734c68e23e0bae81fc12d7...
> Debugging revealed problem is in this call
> {code:java|title=SSLDefinitions.java}
> final Class<?> providerClazz = SSLDefinitions.class.getClassLoader().loadClass("com.sun.net.ssl.internal.ssl.Provider");
> {code}
> which ends with ClassNotFoundException
> {code}
> java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "org.wildfly.extension.elytron" version 5.0.0.Alpha-redhat-20180502 from local module loader @41ee392b (finder: local module finder @1e67a849 (roots: /home/mchoma/Repos/tests-security/fips/target/dist/jboss-eap/modules,/home/mchoma/Repos/tests-security/fips/target/dist/jboss-eap/modules/system/layers/base))]
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFCORE-3814) Upgrade to Galleon 1.0.0.CR1 and plugins 1.0.0.CR2
by Alexey Loubyansky (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3814?page=com.atlassian.jira.plugi... ]
Alexey Loubyansky updated WFCORE-3814:
--------------------------------------
Description:
Galleon 1.0.0.CR1 and plugins 1.0.0.CR2 contain a couple of critical fixes such as:
- support for non-default location of the local Maven repository;
- skip copying artifacts with missing versions;
- more debug logging in the maven plugins.
was:Galleon and plugins 1.0.0.CR1 contain a couple of critical fixes such as support for non-default location of the local Maven repository.
> Upgrade to Galleon 1.0.0.CR1 and plugins 1.0.0.CR2
> --------------------------------------------------
>
> Key: WFCORE-3814
> URL: https://issues.jboss.org/browse/WFCORE-3814
> Project: WildFly Core
> Issue Type: Task
> Reporter: Alexey Loubyansky
> Assignee: Alexey Loubyansky
> Fix For: 5.0.0.Beta1
>
>
> Galleon 1.0.0.CR1 and plugins 1.0.0.CR2 contain a couple of critical fixes such as:
> - support for non-default location of the local Maven repository;
> - skip copying artifacts with missing versions;
> - more debug logging in the maven plugins.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFCORE-3799) FIPS mode is not detected correctly on JDK 8
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3799?page=com.atlassian.jira.plugi... ]
Darran Lofthouse edited comment on WFCORE-3799 at 5/10/18 12:07 PM:
--------------------------------------------------------------------
A very simple reproducer for the underlying issue is to enable TRACE logging for 'org.wildfly.extension.elytron', when this error situation is present the following will be logged regardless of the actual SSL / FIPS configuration in place.
{noformat}
2018-05-10 17:05:53,540 TRACE [org.wildfly.extension.elytron] (ServerService Thread Pool -- 6) Unable to find com.sun.net.ssl.internal.ssl.Provider.isFIPS() method.: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "org.wildfly.extension.elytron" version 5.0.0.Beta1-SNAPSHOT from local module loader @3ac3fd8b (finder: local module finder @5594a1b5 (roots: /home/darranl/src/wildfly13/wildfly-core/build/target/wildfly-core-5.0.0.Beta1-SNAPSHOT/modules,/home/darranl/src/wildfly13/wildfly-core/build/target/wildfly-core-5.0.0.Beta1-SNAPSHOT/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.wildfly.extension.elytron.SSLDefinitions.getFipsSupplier(SSLDefinitions.java:1087)
at org.wildfly.extension.elytron.SSLDefinitions.<clinit>(SSLDefinitions.java:130)
at org.wildfly.extension.elytron.TlsParser.<init>(TlsParser.java:49)
at org.wildfly.extension.elytron.ElytronSubsystemParser1_0.getTlsParser(ElytronSubsystemParser1_0.java:118)
{noformat}
was (Author: dlofthouse):
A very simple reproducer for the underlying issue is to enable TRACE logging for 'org.wildfly.extension.elytron', when this error situation is present the following will be logged regardless of the actual SSL / FIPS configuration in place.
{noformat}
2018-05-10 17:05:53,540 TRACE [org.wildfly.extension.elytron] (ServerService Thread Pool -- 6) Unable to find com.sun.net.ssl.internal.ssl.Provider.isFIPS() method.: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "org.wildfly.extension.elytron" version 5.0.0.Beta1-SNAPSHOT from local module loader @3ac3fd8b (finder: local module finder @5594a1b5 (roots: /home/darranl/src/wildfly13/wildfly-core/build/target/wildfly-core-5.0.0.Beta1-SNAPSHOT/modules,/home/darranl/src/wildfly13/wildfly-core/build/target/wildfly-core-5.0.0.Beta1-SNAPSHOT/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.wildfly.extension.elytron.SSLDefinitions.getFipsSupplier(SSLDefinitions.java:1087)
at org.wildfly.extension.elytron.SSLDefinitions.<clinit>(SSLDefinitions.java:130)
at org.wildfly.extension.elytron.TlsParser.<init>(TlsParser.java:49)
at org.wildfly.extension.elytron.ElytronSubsystemParser1_0.getTlsParser(ElytronSubsystemParser1_0.java:118)
{nofomat}
> FIPS mode is not detected correctly on JDK 8
> --------------------------------------------
>
> Key: WFCORE-3799
> URL: https://issues.jboss.org/browse/WFCORE-3799
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Affects Versions: 5.0.0.Alpha4
> Environment: jdk 8
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Priority: Blocker
>
> Trying SSL in FIPS mode I get "KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used"
> {code}
> 17:45:32,678 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service org.wildfly.security.ssl-context.server-ssl-context: org.jboss.msc.service.StartException in service org.wildfly.security.ssl-context.server-ssl-context: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> at org.wildfly.extension.elytron.SSLDefinitions$6.lambda$getValueSupplier$1(SSLDefinitions.java:926)
> at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
> at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> at sun.security.ssl.SSLContextImpl.chooseKeyManager(SSLContextImpl.java:149)
> at sun.security.ssl.SSLContextImpl.engineInit(SSLContextImpl.java:66)
> at javax.net.ssl.SSLContext.init(SSLContext.java:282)
> at org.wildfly.security.ssl.SSLContextBuilder.lambda$build$0(SSLContextBuilder.java:372)
> at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:53)
> at org.wildfly.extension.elytron.SSLDefinitions$6.lambda$getValueSupplier$1(SSLDefinitions.java:924)
> ... 9 more
> 17:45:32,686 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("server-ssl-context" => "server-ssl-context")
> ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.ssl-context.server-ssl-context" => "java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> Caused by: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used"}}
> {code}
> https://github.com/wildfly/wildfly-core/blob/02e2de734c68e23e0bae81fc12d7...
> Debugging revealed problem is in this call
> {code:java|title=SSLDefinitions.java}
> final Class<?> providerClazz = SSLDefinitions.class.getClassLoader().loadClass("com.sun.net.ssl.internal.ssl.Provider");
> {code}
> which ends with ClassNotFoundException
> {code}
> java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "org.wildfly.extension.elytron" version 5.0.0.Alpha-redhat-20180502 from local module loader @41ee392b (finder: local module finder @1e67a849 (roots: /home/mchoma/Repos/tests-security/fips/target/dist/jboss-eap/modules,/home/mchoma/Repos/tests-security/fips/target/dist/jboss-eap/modules/system/layers/base))]
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFCORE-3799) FIPS mode is not detected correctly on JDK 8
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3799?page=com.atlassian.jira.plugi... ]
Darran Lofthouse commented on WFCORE-3799:
------------------------------------------
A very simple reproducer for the underlying issue is to enable TRACE logging for 'org.wildfly.extension.elytron', when this error situation is present the following will be logged regardless of the actual SSL / FIPS configuration in place.
{noformat}
2018-05-10 17:05:53,540 TRACE [org.wildfly.extension.elytron] (ServerService Thread Pool -- 6) Unable to find com.sun.net.ssl.internal.ssl.Provider.isFIPS() method.: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "org.wildfly.extension.elytron" version 5.0.0.Beta1-SNAPSHOT from local module loader @3ac3fd8b (finder: local module finder @5594a1b5 (roots: /home/darranl/src/wildfly13/wildfly-core/build/target/wildfly-core-5.0.0.Beta1-SNAPSHOT/modules,/home/darranl/src/wildfly13/wildfly-core/build/target/wildfly-core-5.0.0.Beta1-SNAPSHOT/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.wildfly.extension.elytron.SSLDefinitions.getFipsSupplier(SSLDefinitions.java:1087)
at org.wildfly.extension.elytron.SSLDefinitions.<clinit>(SSLDefinitions.java:130)
at org.wildfly.extension.elytron.TlsParser.<init>(TlsParser.java:49)
at org.wildfly.extension.elytron.ElytronSubsystemParser1_0.getTlsParser(ElytronSubsystemParser1_0.java:118)
{nofomat}
> FIPS mode is not detected correctly on JDK 8
> --------------------------------------------
>
> Key: WFCORE-3799
> URL: https://issues.jboss.org/browse/WFCORE-3799
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Affects Versions: 5.0.0.Alpha4
> Environment: jdk 8
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Priority: Blocker
>
> Trying SSL in FIPS mode I get "KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used"
> {code}
> 17:45:32,678 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service org.wildfly.security.ssl-context.server-ssl-context: org.jboss.msc.service.StartException in service org.wildfly.security.ssl-context.server-ssl-context: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> at org.wildfly.extension.elytron.SSLDefinitions$6.lambda$getValueSupplier$1(SSLDefinitions.java:926)
> at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
> at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> at sun.security.ssl.SSLContextImpl.chooseKeyManager(SSLContextImpl.java:149)
> at sun.security.ssl.SSLContextImpl.engineInit(SSLContextImpl.java:66)
> at javax.net.ssl.SSLContext.init(SSLContext.java:282)
> at org.wildfly.security.ssl.SSLContextBuilder.lambda$build$0(SSLContextBuilder.java:372)
> at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:53)
> at org.wildfly.extension.elytron.SSLDefinitions$6.lambda$getValueSupplier$1(SSLDefinitions.java:924)
> ... 9 more
> 17:45:32,686 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("server-ssl-context" => "server-ssl-context")
> ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.ssl-context.server-ssl-context" => "java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used
> Caused by: java.security.KeyManagementException: FIPS mode: only SunJSSE KeyManagers may be used"}}
> {code}
> https://github.com/wildfly/wildfly-core/blob/02e2de734c68e23e0bae81fc12d7...
> Debugging revealed problem is in this call
> {code:java|title=SSLDefinitions.java}
> final Class<?> providerClazz = SSLDefinitions.class.getClassLoader().loadClass("com.sun.net.ssl.internal.ssl.Provider");
> {code}
> which ends with ClassNotFoundException
> {code}
> java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "org.wildfly.extension.elytron" version 5.0.0.Alpha-redhat-20180502 from local module loader @41ee392b (finder: local module finder @1e67a849 (roots: /home/mchoma/Repos/tests-security/fips/target/dist/jboss-eap/modules,/home/mchoma/Repos/tests-security/fips/target/dist/jboss-eap/modules/system/layers/base))]
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFCORE-3818) Improved console color capability detection
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3818?page=com.atlassian.jira.plugi... ]
David Lloyd updated WFCORE-3818:
--------------------------------
Description:
We should improve on our ability to correctly detect color capabilities on the console. Many times, build logs in CI environments and similar cases are hard to read due to ANSI codes being written to a console that did not have color capabilities, and this could have been detected.
In the bash scripts, logic like the following can be used:
* If the {{tput}} command does not exist, fall back to checking {{TERM}}.
* If {{tput colors}} returns 8, 16, or 256, the terminal supports at least that many colors.
* The {{TERM}} var: the terminal supports 256 colors if {{TERM}} contains values xterm-256color, screen-256color, or generally any value containing 256 probably indicates color support.
* Check the value of the COLORTERM environment variable; if truecolor or 24bit, then you have 24-bit RGB capability (this should apply to Linux, Mac OS X, and Windows).
On Windows, COLORTERM is also usually supported in terminals supporting 24-bit RGB; presence of this env var may be sufficient to enable color. The TERM environment variable is also often supported.
was:
We should improve on our ability to correctly detect color capabilities on the console. Many times, build logs in CI environments and similar cases are hard to read due to ANSI codes being written to a console that did not have color capabilities, and this could have been detected.
In the bash scripts, logic like the following can be used:
* If the {{tput}} command does not exist, fall back to checking {{TERM}}.
* If {{tput colors}} returns 8, 16, or 256, the terminal supports at least that many colors.
* The {{TERM}} var: the terminal supports 256 colors if {{TERM}] contains values xterm-256color, screen-256color, or generally any value containing 256 probably indicates color support.
* Check the value of the COLORTERM environment variable; if truecolor or 24bit, then you have 24-bit RGB capability (this should apply to Linux, Mac OS X, and Windows).
On Windows, COLORTERM is also usually supported in terminals supporting 24-bit RGB; presence of this env var may be sufficient to enable color. The TERM environment variable is also often supported.
> Improved console color capability detection
> -------------------------------------------
>
> Key: WFCORE-3818
> URL: https://issues.jboss.org/browse/WFCORE-3818
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Logging, Scripts
> Reporter: David Lloyd
>
> We should improve on our ability to correctly detect color capabilities on the console. Many times, build logs in CI environments and similar cases are hard to read due to ANSI codes being written to a console that did not have color capabilities, and this could have been detected.
> In the bash scripts, logic like the following can be used:
> * If the {{tput}} command does not exist, fall back to checking {{TERM}}.
> * If {{tput colors}} returns 8, 16, or 256, the terminal supports at least that many colors.
> * The {{TERM}} var: the terminal supports 256 colors if {{TERM}} contains values xterm-256color, screen-256color, or generally any value containing 256 probably indicates color support.
> * Check the value of the COLORTERM environment variable; if truecolor or 24bit, then you have 24-bit RGB capability (this should apply to Linux, Mac OS X, and Windows).
> On Windows, COLORTERM is also usually supported in terminals supporting 24-bit RGB; presence of this env var may be sufficient to enable color. The TERM environment variable is also often supported.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months