normenmueller / f-p

A new programming model for asynchronous and distributed programming.
http://lampwww.epfl.ch/~hmiller/f-p
1 stars 2 forks source link

Duplication of log level in every line #8

Open jvican opened 8 years ago

jvican commented 8 years ago

When running the first example, I get:

[info] Running fp.samples.netty.sandbox.SiloSystemClientMode 
[info] [info ] fp.SiloSystem$                      - Initializing silo system with `fp.backend.netty.SiloSystem`
[info] [info ] f.s.n.sandbox.SiloSystemClientMode$ - Silo system `f2265fa2-43d5-44a8-96b8-dda441808c33` up and running.
[info] [info ] f.s.n.sandbox.SiloSystemClientMode$ - Initiating termination of silo system `f2265fa2-43d5-44a8-96b8-dda441808c33`...
[info] [info ] fp.backend.netty.SiloSystem         - Silo system `f2265fa2-43d5-44a8-96b8-dda441808c33` terminating...
[info] [info ] fp.backend.netty.SiloSystem         - Silo system `f2265fa2-43d5-44a8-96b8-dda441808c33` terminating done.
[info] [info ] f.s.n.sandbox.SiloSystemClientMode$ - Silo system `f2265fa2-43d5-44a8-96b8-dda441808c33` terminated.

where the second column is colored and the first one is not.

Do you know how to fix this @normenmueller?

normenmueller commented 8 years ago

I wouldn't call it a bug, but anyway, we have two options:

  1. Remove util/Logger.scala
  2. Add samples/src/multi-jvm/resources/logback-test.xml

I'd suggest to go for option (2) with

core/src/main/resources/logback.xm:

<configuration>
  <conversionRule conversionWord="coloredLevel" converterClass="silt.util.ColoredLoggerLevel" />
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%coloredLevel %-35logger{35} - %message%n%xException{5}</pattern>
    </encoder>
  </appender>
  <logger name="io.netty"                                   level="OFF" />
 ...
  <root level="DEBUG">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>

and samples/src/multi-jvm/resources/logback-test.xml:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%level %-35logger{35} - %message%n%xException{5}</pattern>
    </encoder>
  </appender>
  <logger name="io.netty"                                   level="OFF" />
  ...
  <root level="DEBUG">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>

Choose what ever you prefer @jvican

jvican commented 8 years ago

Thanks for the reply @normenmueller. I'm going with (2). This fix will be included in #9.