-
1. Re: [stdout] in Eclipse console prints two newlines
jaikiran Nov 2, 2011 10:22 AM (in response to kwutzke)1 of 1 people found this helpfulWhat do your logging configurations and output look like? Also which file is it logged to?
P.S: 7.0.2 is the latest released version, you might want to try that instead of 7.0.1
-
2. Re: [stdout] in Eclipse console prints two newlines
kwutzke Nov 2, 2011 8:45 PM (in response to jaikiran)My logging config in standalone.xml looks like this:
{code}
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<console-handler name="CONSOLE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="org.jboss.as.jpa">
<level name="WARN"/>
</logger>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
</subsystem>
{code}
Removing the trailing %n from the pattern-formatter pattern affects all output, logging and stdout. Removing the %n makes the other one-line logging output no a newline at all, two-newline outputs are one-line now. Worse than before.
What's wrong? Maybe a Windows only issue?? How do you fix this? This seems to affect all JBoss AS versions...
Karsten
-
3. Re: [stdout] in Eclipse console prints two newlines
jaikiran Nov 2, 2011 11:31 PM (in response to kwutzke)Can you post the actual logs please? Which version of Windows is this? Also which vendor and version of Java are you using?
-
5. Re: [stdout] in Eclipse console prints two newlines
kwutzke Nov 3, 2011 7:39 AM (in response to jaikiran)I'm using JDK 7:
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
OS is Windows 7 Professional 64 bit, BUILD 7601 (SP1).
Snipped server.log is attached.
Karsten
-
server.log.zip 4.1 KB
-
-
6. Re: [stdout] in Eclipse console prints two newlines
rhusar Nov 7, 2011 8:46 AM (in response to kwutzke)Maybe it is just telling you to stop logging via stdout and use a logger instead What happens if you switch to print instead of println? Does that happen on JDK 6 too? Does it happen on other OS as well?
public void println(String x)
Prints a String and then terminate the line. This method behaves as though it invokes PrintStream.print(String) and then PrintStream.println().