
Hi all, So I still have some problems with the socketAppender. I'm using the server and the client (sample code) that comes with the Logback. I'm sending a string to a server that is about 4KB in size. (in the "for" loop) When I'm executing this "for" loop once or twice or even 4 times nothing gets transmitted from the client to the server. I get nothing just a message that server is waiting for data, then I get message saying that the socket connections has been closed. Now, when I'm executing the same exactly code and I'm running the same loop (that sends the 4KB string over to the server) but say 10 or more times, everything works! I'm not an expert on how TCP/IP works but it looks to me that the socket closes the connection before the data I'm sending gets actually transmitted to the server. How do I keep the socket open until the data gets to the server? Any suggestion? Thanks Greg

Greg Flex skrev:
How do I keep the socket open until the data gets to the server? Hi.
Could you please create an archive (zip, jar, whatever) containing your setup in a runnable form, and then create a JIRA issue and attach the file there? This allows the issue investigator to see what you see, since it might be a simple configuration issue, an API misunderstanding, an incorrect example or a complex bug you have found. /Thorbjørn

Hi Thorbjørn Ravn Andersen, How do I create an JIRA issue? Greg. On Mon, Nov 3, 2008 at 12:03 PM, Thorbjørn Ravn Andersen <ravn@runjva.com>wrote:
Greg Flex skrev:
How do I keep the socket open until the data gets to the server? Hi.
Could you please create an archive (zip, jar, whatever) containing your setup in a runnable form, and then create a JIRA issue and attach the file there?
This allows the issue investigator to see what you see, since it might be a simple configuration issue, an API misunderstanding, an incorrect example or a complex bug you have found.
/Thorbjørn
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

Greg Flex skrev:
Hi Thorbjørn Ravn Andersen, How do I create an JIRA issue?
To report an error you must create a login at http://jira.qos.ch/secure/Signup!default.jspa You can then log in to http://jira.qos.ch/secure/Dashboard.jspa and create an issue in the LBCORE (I think) project. Otherwise mail me the jar file privately (address is valid) and I'll have a look. /Thorbjørn

I just created the JIRA issue. Please take a look at it. Thanks Greg. On Mon, Nov 3, 2008 at 12:31 PM, Thorbjørn Ravn Andersen <ravn@runjva.com>wrote:
Greg Flex skrev:
Hi Thorbjørn Ravn Andersen, How do I create an JIRA issue?
To report an error you must create a login at http://jira.qos.ch/secure/Signup!default.jspa<http://jira.qos.ch/secure/Signup%21default.jspa>
You can then log in to http://jira.qos.ch/secure/Dashboard.jspa and create an issue in the LBCORE (I think) project.
Otherwise mail me the jar file privately (address is valid) and I'll have a look.
/Thorbjørn _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

Hi Thorbjørn Ravn Andersen, I solved it!!! Never mind the ticket/issue I've created then. I called at the end of my program the socketAppender.stop(); and it worked. Now when just single message is send, it will be written correctly etc. Greg On Mon, Nov 3, 2008 at 1:10 PM, Greg Flex <greg.flex@gmail.com> wrote:
I just created the JIRA issue. Please take a look at it. Thanks Greg.
On Mon, Nov 3, 2008 at 12:31 PM, Thorbjørn Ravn Andersen <ravn@runjva.com>wrote:
Greg Flex skrev:
Hi Thorbjørn Ravn Andersen, How do I create an JIRA issue?
To report an error you must create a login at http://jira.qos.ch/secure/Signup!default.jspa<http://jira.qos.ch/secure/Signup%21default.jspa>
You can then log in to http://jira.qos.ch/secure/Dashboard.jspa and create an issue in the LBCORE (I think) project.
Otherwise mail me the jar file privately (address is valid) and I'll have a look.
/Thorbjørn _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

Hello Greg, This problem is called "Exit Woes". Search for Exit Woes in http://logback.qos.ch/manual/appenders.html You should shutdown the loggerContext when you stop your application to avoid "flushing" issues which also occur with TCP sockets. The relevant code is: LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); lc.shutdownAndReset(); Anyway, I am glad you could find a solution on your own. Greg Flex wrote:
Hi Thorbjørn Ravn Andersen, I solved it!!! Never mind the ticket/issue I've created then. I called at the end of my program the socketAppender.stop(); and it worked. Now when just single message is send, it will be written correctly etc. Greg
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Greg Flex skrev:
Hi Thorbjørn Ravn Andersen, I solved it!!! Never mind the ticket/issue I've created then. I called at the end of my program the socketAppender.stop(); and it worked. Now when just single message is send, it will be written correctly etc. Great to hear you got it working.
Often just the process of creating a working scenario for others to see, makes a bell ring in your mind. I am glad that's what apparently happened here :) /Thorbjørn
participants (3)
-
Ceki Gulcu
-
Greg Flex
-
Thorbjørn Ravn Andersen