logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44108] - Telnet Appender misses messages
Date Wed, 19 Dec 2007 23:56:16 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44108>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44108





------- Additional Comments From daniel.armbrust.list@gmail.com  2007-12-19 15:56 -------
1 more issue regarding line feeds - one in my new code, one in the other
existing code.

My code posted above needs this replacement (I was using system line feeds, and
not the line feeds called out in the telnet RFC):

if (connections.size() < MAX_CONNECTIONS)
					{
						connections.addElement(tc);
						tc.writer.print("TelnetAppender v1.0 (" + connections.size() + " active
connections)\r\n\r\n");
						tc.writer.flush();
					}
					else
					{
						tc.writer.print("Too many connections.\r\n");
						tc.writer.flush();
						tc.close();
					}



Finally, the append method should have this in it:

for (int i = 0; i < len; i++)
{
	sh.send(s[i] + "\r\n");
}

The existing code uses the system line feed character instead of the correct
telnet line feed.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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