Server side trace not working?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Sparticus
Posts: 217
Joined: 27 Feb 2006, 17:44
Location: Canada
Contact:

Server side trace not working?

Postby Sparticus » 25 Apr 2011, 18:20

I used to be able to do this serverside :

trace("hello");

and it would print out to the server dos console (when running standalone).

Now it doesn't anymore... I did upgrade to the latest version recently so maybe that has something to do with it.

In the admin tool all the following are set to ON :

- use debug mode
- user friendly logging
- start extension file monitoring
- extension remote debug

Ideas?
Sparticus
Posts: 217
Joined: 27 Feb 2006, 17:44
Location: Canada
Contact:

Postby Sparticus » 25 Apr 2011, 18:38

I just found out the traces are appearing in the logs.... but not in the console...


it was nice to see it in the console as i'd rather not have to open the log constantly to see if anything new has been written to it
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Postby tchen » 26 Apr 2011, 08:39

I haven't updated to RC2 yet, but you might want to check the log4j.properties to make sure that consoleAppender is still part of the output lines.

from my version

Code: Select all

log4j.category.com.smartfoxserver=INFO,consoleAppender,fileAppender
log4j.category.sfs.test=INFO,consoleAppender,fileAppender
log4j.category.org.apache.commons.vfs=INFO,consoleAppender,fileAppender
log4j.category.org.mortbay.log=WARN,consoleAppender,fileAppender
log4j.category.bootLogger=DEBUG,bootFileAppender,bootConsoleAppender
log4j.category.sfs2x=INFO,consoleAppender,fileAppender
log4j.category.Extensions=INFO,consoleAppender,fileAppender


Failing that, you could always use tail -f <filename> to view the log without reopening it every time there's a new line.
dingo
Posts: 97
Joined: 27 Jan 2009, 21:34

Postby dingo » 17 Jul 2011, 13:15

I just updated to RC3, now my traces are also missing in the console, but they're written to the log.

here's my log4j.properties:

Code: Select all

#log4j.category.com.smartfoxserver.v2=DEBUG,consoleAppender,fileAppender,socketAppender
log4j.category.com.smartfoxserver=INFO,consoleAppender,fileAppender
log4j.category.sfs.test=INFO,consoleAppender,fileAppender
log4j.category.org.apache.commons.vfs=INFO,consoleAppender,fileAppender
log4j.category.org.mortbay.log=WARN,consoleAppender,fileAppender
log4j.category.bootLogger=DEBUG,bootFileAppender,bootConsoleAppender
log4j.category.sfs2x=INFO,consoleAppender,fileAppender
log4j.category.Extensions=INFO,consoleAppender,fileAppender


any ideas what i need to change to fix this?
dingo
Posts: 97
Joined: 27 Jan 2009, 21:34

Postby dingo » 17 Jul 2011, 15:10

ok, seems to be working now.
perhaps because i wasn't using the sfs2x.bat file.

btw, just setup remote debugging, works great, but only when using the custom bat file as described by gabrielt:

viewtopic.php?t=11374
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Re: Server side trace not working?

Postby Carl Lydon » 07 Aug 2012, 00:32

If I did a trace from another class besides my main class, all traces would stop (but no errors). Finally figured it out by calling a function on my main to do my traces.
Last edited by Carl Lydon on 07 Aug 2012, 17:43, edited 1 time in total.
User avatar
Lapo
Site Admin
Posts: 20959
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server side trace not working?

Postby Lapo » 07 Aug 2012, 08:47

And super-unclear :)
Please provide the details so we can look into it and if it's a bug we will fix it.
Also make sure to use our latest version (2.2.0) before submitting bug reports. Thanks!
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Re: Server side trace not working?

Postby Carl Lydon » 07 Aug 2012, 17:51

Sorry my post was unclear. Basically, I was having the same problem as the posters above. My traces were not appearing when I used the zone monitor in the admin tool. They would appear when I traced from my main extension class, but not from any other class. If I add a trace in any other class, my traces from the main class also become disabled.

I worked around the problem by calling a function in my main class that does the traces. Until I did this, I simply thought my cods was broken because I wasn't seeing the expected traces.

I will check today to see if the traces work in the log but not the zone monitor, as others people indicated above.

My version is 2.0.1. I downloaded the SFS2X just a few weeks ago so I was unaware that it was already out of date.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 22 guests