<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <font face="Calibri">Yes, of course, that's the usefulness of
      loggers, but that doesn't mean system println is worse than INFO
      logging in test code. Meaning, to the point of adding checkstyle
      misery.</font><br>
    <br>
    <div class="moz-cite-prefix">On 1/27/2016 9:13 AM, Peter Palaga
      wrote:<br>
    </div>
    <blockquote cite="mid:56A8D08B.6020603@redhat.com" type="cite">
      <pre wrap="">Loggers unlike printlns offer some control over topics to log and their 
individual verbosities. In other words it is possible to turn on 
detailed logging for a test that makes problems, and turn off all 
others. -- P

On 2016-01-27 15:05, Thomas Segismont wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">I don't know the motivation of the JIRA, but as far as I'm concerned, I
prefer usage of loggers so that I can have tests verbose in CI but quiet
locally.

Le 27/01/2016 14:58, Juraci Paixão Kröhling a écrit :
</pre>
        <blockquote type="cite">
          <pre wrap="">Good question. In general, I quite like when tests write some debugging
information to stdout/stderr , so that tools like Jenkins can record the
output that each specific test had.

- Juca.

On 27.01.2016 14:55, Jay Shaughnessy wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">
Just out of curiosity, i'm not against a change, but what is the reason
to not have printlns, the jira just says "should not have" and doesn't
state the misfortune that befalls their use.

On 1/27/2016 4:44 AM, Peter Palaga wrote:
</pre>
            <blockquote type="cite">
              <pre wrap="">Hi *,

Short version: How to configure the log levels for individual
jboss.logging loggers in tests run by maven outside the container?

Long version:
I was recently assignedhttps://issues.jboss.org/browse/HAWKULAR-264  Add
println checks to the checkstyle. It says that "Tests shouldn't be
allowed to have printlns, we should enforce this via the checkstyle plugin."

I fully agree for tests being run on the server side - those can use
JBoss Logging in the very same manner as the server code.

However, what is the best replacement for println()s in tests that are
run outside the server?

I tried using JBoss Logging there too but I failed completely to find a
way to configure the log levels for individual loggers. Does anybody
know how to do that?

To get my work done without using printlns, I started to use
java.util.logging configured via logging.properties :
<a class="moz-txt-link-freetext" href="https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent-itest-parent/hawkular-wildfly-agent-itest/src/test/resources/logging.properties">https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent-itest-parent/hawkular-wildfly-agent-itest/src/test/resources/logging.properties</a>

So what should be the replacement for printlns in tests?

Thanks,

Peter
_______________________________________________
hawkular-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a>

</pre>
            </blockquote>
            <pre wrap="">


_______________________________________________
hawkular-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a>

</pre>
          </blockquote>
          <pre wrap="">_______________________________________________
hawkular-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a>

</pre>
        </blockquote>
        <pre wrap="">
_______________________________________________
hawkular-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a>

</pre>
      </blockquote>
      <pre wrap="">
_______________________________________________
hawkular-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>