I'm loadtesting my application right now by creating a java client that logs X number of users into the system. The problem right now is that my machine runs out of memory from all the log statements being printed out.
........
609 [New I/O client worker #1-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event connect to 1 listeners
593 [New I/O client worker #2-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event OnConnect to 1 listeners
625 [New I/O client worker #2-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event connect to 1 listeners
.........
I have debug set to false in both my configuration file and when creating a new SmartFox(false) instance and even tried using setDebug(false);
Any ideas how to turn all these INFO messages off would be a lot of help.
Thanks!
Adam
How do I turn off Logging?
-
- Posts: 6
- Joined: 11 Aug 2011, 18:39
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
The log could be turned off via the logger class itself that you feed the API.
Or by binding it to a SLF4J log implementation that disregards all logs (NOP module). Or the log4j binding that can be detailed controlled. Etc
But yeah - that particular piece of code would be super spammy in your situation - and doesnt have a "is debug check". I'll try to see if its possible for that to check for the debug flag. Uncertain I have easy access to it though from that particular spot :-/
/Thomas
Or by binding it to a SLF4J log implementation that disregards all logs (NOP module). Or the log4j binding that can be detailed controlled. Etc
But yeah - that particular piece of code would be super spammy in your situation - and doesnt have a "is debug check". I'll try to see if its possible for that to check for the debug flag. Uncertain I have easy access to it though from that particular spot :-/
/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
- janheuninck
- Posts: 68
- Joined: 23 Nov 2011, 01:35
- Location: Vancouver BC, Canada
Re: How do I turn off Logging?
I have the same problem. The console is being spammed with these info-messages, although the debug mode is set to false... Any solutions?
-
- Posts: 6
- Joined: 11 Aug 2011, 18:39
Re: How do I turn off Logging?
I ended up making my load test client in flash only because it was a lot easier for me to control. I have it set up so I can load in CSV files from the database and run tests such as login the first 100 users every .5 seconds and record the how long it takes to retrieve their friends.
I can turn off logging in the flash client and if I do run out of memory which happens at around 1000 users on my system I can just split the load on multiple browsers - run 1-1000 clients in browser a, 1001-2000 clients in browser b, etc.
Hope this helps.
I can turn off logging in the flash client and if I do run out of memory which happens at around 1000 users on my system I can just split the load on multiple browsers - run 1-1000 clients in browser a, 1001-2000 clients in browser b, etc.
Hope this helps.
- janheuninck
- Posts: 68
- Joined: 23 Nov 2011, 01:35
- Location: Vancouver BC, Canada
Re: How do I turn off Logging?
admins, is this a bug in the java api?
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Re: How do I turn off Logging?
In the 1.0 release, that particular line of code (the log message) was removed.
So should not be present there anymore - it was not controlled by log level settings, so thats why it keps spamming.
If you still have some error here when using 1.0 version API, then poke me
/Thomas
So should not be present there anymore - it was not controlled by log level settings, so thats why it keps spamming.
If you still have some error here when using 1.0 version API, then poke me
/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
- janheuninck
- Posts: 68
- Joined: 23 Nov 2011, 01:35
- Location: Vancouver BC, Canada
Re: How do I turn off Logging?
ThomasLund wrote:In the 1.0 release, that particular line of code (the log message) was removed.
So should not be present there anymore - it was not controlled by log level settings, so thats why it keps spamming.
If you still have some error here when using 1.0 version API, then poke me
/Thomas
I'm using the latest libraries, but I still get the info messages in the console:
Code: Select all
run:
73 [main] INFO sfs2x.client.core.EventDispatcher - Dispatching event configLoadSuccess to 1 listeners
146 [New I/O client worker #1-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event OnConnect to 1 listeners
146 [New I/O client worker #1-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event connect to 1 listeners
176 [New I/O client worker #1-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event OnData to 1 listeners
176 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Handling New Packet of size 80
177 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Handling Header Size. Length: 79 (small)
177 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Data size is 77
177 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Handling Data: 77, previous state: 0/77
177 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - <<< Packet Complete >>>
Re: How do I turn off Logging?
I have the same problem...
I can't down log level
help...
I can't down log level
Code: Select all
150845 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - <<< Packet Complete >>>
150846 [New I/O client worker #1-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event extensionResponse to 1 listeners
180848 [New I/O client worker #1-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event OnData to 1 listeners
180848 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Handling New Packet of size 59
180849 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Handling Header Size. Length: 58 (small)
180849 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Data size is 56
180849 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - Handling Data: 56, previous state: 0/56
180849 [New I/O client worker #1-1] INFO sfs2x.client.core.SFSIOHandler - <<< Packet Complete >>>
180849 [New I/O client worker #1-1] INFO sfs2x.client.core.EventDispatcher - Dispatching event extensionResponse to 1 listeners
help...
Re: How do I turn off Logging?
Any updates on thisone? how to lower the debug level?
Re: How do I turn off Logging?
temporarily I delete slf4j-simple-1.6.1.jar
its stop write logs ...
its stop write logs ...
Re: How do I turn off Logging?
Did you install the latest API update from this page: http://www.smartfoxserver.com/download/sfs2x#p=updates
Still same issue?
Still same issue?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Re: How do I turn off Logging?
There is mixed up confusion about the initial "log messages that are not controlled by the logger" and normal logging messages.
The stray leftover debug message has been removed. Whats left is regular logged messages.
As written some months ago SLF4J can switch backends for handling the log messages. The slf4j-simple logger backend cannot control the log level. You need to swap it to for example log4j backend. Then you can use regular log4j configuration files for controlling your log message flow.
/Thomas
The stray leftover debug message has been removed. Whats left is regular logged messages.
As written some months ago SLF4J can switch backends for handling the log messages. The slf4j-simple logger backend cannot control the log level. You need to swap it to for example log4j backend. Then you can use regular log4j configuration files for controlling your log message flow.
/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 32 guests