logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Sicker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-481) Stream-Interface for Loggers
Date Mon, 13 Jan 2014 21:57:52 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13870041#comment-13870041
] 

Matt Sicker commented on LOG4J2-481:
------------------------------------

I was going to change the code to just find the first non-whitespace character from the end
of the buffer, but the code got patched before I had a chance to do it.

I know Mac doesn't use it anymore, but {{'\r'}} used to be a legit end of line character,
too. I think finding the last non-whitespace character would be a good end of line. It covers
all edge cases.

> Stream-Interface for Loggers
> ----------------------------
>
>                 Key: LOG4J2-481
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-481
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: API
>    Affects Versions: 2.0-beta9
>         Environment: Linux, Java 1.7
>            Reporter: Joe Merten
>             Fix For: 2.0-rc1
>
>         Attachments: 0001-Add-LoggerStream-and-tests.patch, 0001-Remove-dead-code.patch
>
>
> I would like to have method (or class) to use a logger as a PrintStream, like e.g.:
> {quote}
> PrintStream Logger.getStream(Level level);
> {quote}
> or maybe like this http://www.java2s.com/Open-Source/Java/Testing/jacareto/jacareto/toolkit/log4j/LogOutputStream.java.htm
> (as I recently discovered, org.apache.commons.exec.LogOutputStream is doing different
things).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message