Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colorized logging output is gone in 0.13.0 #1972

Closed
gastaldi opened this issue Apr 10, 2019 · 4 comments
Closed

Colorized logging output is gone in 0.13.0 #1972

gastaldi opened this issue Apr 10, 2019 · 4 comments
Labels
area/logging area/user-experience Will make us lose users kind/bug Something isn't working
Milestone

Comments

@gastaldi
Copy link
Contributor

In 0.12.0, the logging output is colorized and like:

java -jar target/my-app-runner.jar
2019-04-10 03:07:09,774 INFO  [io.quarkus] (main) Quarkus 0.12.0 started in 1.373s. Listening on: http://[::]:8080
2019-04-10 03:07:09,777 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, resteasy-jsonb, smallrye-health]
2019-04-10 03:07:12,572 INFO  [io.quarkus] (main) Quarkus stopped in 0.009s

However in 0.13.0, the output is no longer colorized and changed to:

java -jar target/my-app-runner.jar
Apr 10, 2019 3:07:53 AM io.quarkus.runtime.Application run
WARN: Installation of signal handlers disabled by the presence of the environment variable: DISABLE_SIGNAL_HANDLERS
Apr 10, 2019 3:07:53 AM org.xnio.Xnio <clinit>
INFO: XNIO version 3.7.0.Final
Apr 10, 2019 3:07:53 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.7.0.Final
Apr 10, 2019 3:07:53 AM org.jboss.threads.Version <clinit>
INFO: JBoss Threads version 3.0.0.Alpha4
Apr 10, 2019 3:07:53 AM io.quarkus.runtime.Timing printStartupTime
INFO: Quarkus 0.13.0 started in 0.594s. Listening on: http://[::]:8080
Apr 10, 2019 3:07:53 AM io.quarkus.runtime.Timing printStartupTime
INFO: Installed features: [cdi, resteasy, resteasy-jsonb, smallrye-health]
@gastaldi
Copy link
Contributor Author

gastaldi commented Apr 10, 2019

This is my project structure:

.
├── LICENSE
├── pom.xml
├── README.md
└── src
    └── main
        ├── docker
        │   └── Dockerfile
        ├── java
        │   └── io
        │       └── openshift
        │           └── booster
        │               └── http
        │                   ├── GreetingEndpoint.java
        │                   └── Greeting.java
        └── resources
            └── application.properties

And the contents of application.properties:

➜  cat src/main/resources/application.properties 
# Configuration file
quarkus.http.host=0.0.0.0
quarkus.resteasy.path=/api

And the pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.openshift.appgen</groupId>
  <artifactId>my-app</artifactId>
  <version>1.0.0</version>
  <name>test</name>
  <properties>
    <surefire-plugin.version>2.22.0</surefire-plugin.version>
    <quarkus.version>0.13.0</quarkus.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>
  <description>Generated Application 'test'</description>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-bom</artifactId>
        <version>${quarkus.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-jsonb</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-health</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-arc</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <version>${quarkus.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire-plugin.version}</version>
        <configuration>
          <systemProperties>
            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>native</id>
      <activation>
        <property>
          <name>native</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-maven-plugin</artifactId>
            <version>${quarkus.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>native-image</goal>
                </goals>
                <configuration>
                  <enableHttpUrlHandler>true</enableHttpUrlHandler>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemProperties>
                    <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
                  </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

@FroMage FroMage added kind/bug Something isn't working area/logging area/user-experience Will make us lose users labels Apr 10, 2019
@gsmet
Copy link
Member

gsmet commented Apr 10, 2019

Reproduced here with a quickstart.

@gsmet
Copy link
Member

gsmet commented Apr 10, 2019

This is due to this patch: c8ba30f#diff-19c0f957ef85cdc7857ae75b02ef9503R38 .

The logger is accessed too early and thus the log manager is initialized before we set it properly.

Furthermore the logic is incorrect in:

if (ImageInfo.inImageRuntimeCode() && System.getenv(property) == null) {
   // install signal handlers
} else {
   // warn
}

in JVM mode the condition is not triggered and the warn message is always displayed, which is not what we want. The system env test should be nested.

This is a severe regression :/. Too bad we haven't caught it yesterday...

@dmlloyd what's your take on this? TBH, I don't think having a warning at startup is a good idea because if you set the property, I suspect you don't want the warning. But even if we make it debug, we would have move the signal handling setup later.

@dmlloyd
Copy link
Member

dmlloyd commented Apr 13, 2019

Just want to point out for future reference that it wasn't colorized logging that was gone due to the regression, it was the entire log manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging area/user-experience Will make us lose users kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants