Surpress Smartfox Logging information

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

Moderators: Lapo, Bax

andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

Surpress Smartfox Logging information

Postby andrew2110 » 04 Apr 2017, 07:59

The good thing about SmartFox is that it just works and never falls over unless I've done something dumb. With this in mind, is there a way I can tell SmartFox to stop logging certain bits of information. For example I don't need to log anything that SFSRoomManager is doing, rooms are created and destroyed several times a minute in my game with users coming and going all the time, a typical section of the logs file may look like:

Code: Select all

04 Apr 2017 | 00:16:29,216 | INFO  | SFSWorker:Ext:3 | entities.managers.SFSRoomManager |     | Room created: { Zone: HA }, [ Room: R740, Id: 2107, Group: default, isGame: true ], type = SFSRoom
04 Apr 2017 | 00:16:29,217 | INFO  | SFSWorker:Ext:3 | v2.api.SFSApi |     | Room joined: [ Room: R740, Id: 2107, Group: default, isGame: true ], { Zone: HA }, ( User Name: 1709191458, Id: 502, Priv: 1, Sess: 66.87.127.243:7146 ) , asSpect: false
04 Apr 2017 | 00:16:35,356 | INFO  | SFSWorker:Ext:1 | entities.managers.SFSRoomManager |     | Room removed: { Zone: H3D }, [ Room: R1153, Id: 2105, Group: NR, isGame: true ], Duration: 50198
04 Apr 2017 | 00:16:44,791 | INFO  | SFSWorker:Ext:2 | entities.managers.SFSRoomManager |     | Room created: { Zone: H3D }, [ Room: R1154, Id: 2108, Group: NR, isGame: true ], type = SFSRoom
04 Apr 2017 | 00:16:44,792 | INFO  | SFSWorker:Ext:2 | v2.api.SFSApi |     | Room joined: [ Room: R1154, Id: 2108, Group: NR, isGame: true ], { Zone: H3D }, ( User Name: 19003, Id: 497, Priv: 0, Sess: 81.106.44.25:4393 ) , asSpect: false
04 Apr 2017 | 00:17:06,536 | INFO  | SFSWorker:Ext:1 | entities.managers.SFSRoomManager |     | Room removed: { Zone: HA }, [ Room: R740, Id: 2107, Group: default, isGame: true ], Duration: 37324
04 Apr 2017 | 00:17:07,653 | INFO  | SFSWorker:Ext:4 | entities.managers.SFSRoomManager |     | Room removed: { Zone: HA }, [ Room: R739, Id: 2106, Group: default, isGame: true ], Duration: 47879
04 Apr 2017 | 00:17:09,996 | INFO  | SFSWorker:Ext:4 | entities.managers.SFSRoomManager |     | Room created: { Zone: HA }, [ Room: R741, Id: 2109, Group: default, isGame: true ], type = SFSRoom
04 Apr 2017 | 00:17:09,996 | INFO  | SFSWorker:Ext:4 | v2.api.SFSApi |     | Room joined: [ Room: R741, Id: 2109, Group: default, isGame: true ], { Zone: HA }, ( User Name: 1709175727, Id: 488, Priv: 1, Sess: 67.185.253.90:42271 ) , asSpect: false
04 Apr 2017 | 00:17:24,882 | INFO  | SFSWorker:Ext:3 | entities.managers.SFSRoomManager |     | Room removed: { Zone: H3D }, [ Room: R1154, Id: 2108, Group: NR, isGame: true ], Duration: 40096
04 Apr 2017 | 00:17:41,131 | INFO  | SFSWorker:Ext:2 | entities.managers.SFSRoomManager |     | Room removed: { Zone: HA }, [ Room: R741, Id: 2109, Group: default, isGame: true ], Duration: 31140
04 Apr 2017 | 00:17:42,721 | INFO  | SFSWorker:Ext:3 | entities.managers.SFSRoomManager |     | Room created: { Zone: HA }, [ Room: R742, Id: 2110, Group: default, isGame: true ], type = SFSRoom
04 Apr 2017 | 00:17:42,721 | INFO  | SFSWorker:Ext:3 | v2.api.SFSApi |     | Room joined: [ Room: R742, Id: 2110, Group: default, isGame: true ], { Zone: HA }, ( User Name: 1709175727, Id: 488, Priv: 1, Sess: 67.185.253.90:42271 ) , asSpect: false
04 Apr 2017 | 00:18:06,663 | INFO  | SFSWorker:Ext:1 | entities.managers.SFSRoomManager |     | Room removed: { Zone: HA }, [ Room: R742, Id: 2110, Group: default, isGame: true ], Duration: 23946
04 Apr 2017 | 00:18:08,482 | INFO  | SFSWorker:Ext:3 | entities.managers.SFSRoomManager |     | Room created: { Zone: HA }, [ Room: R743, Id: 2111, Group: default, isGame: true ], type = SFSRoom
04 Apr 2017 | 00:18:08,483 | INFO  | SFSWorker:Ext:3 | v2.api.SFSApi |     | Room joined: [ Room: R743, Id: 2111, Group: default, isGame: true ], { Zone: HA }, ( User Name: 1709175727, Id: 488, Priv: 1, Sess: 67.185.253.90:42271 ) , asSpect: false
04 Apr 2017 | 00:18:15,006 | INFO  | SocketReader | bitswarm.sessions.DefaultSessionManager |     | Session created: { Id: 516, Type: DEFAULT, Logged: No, IP: 1.128.96.207:31771 } on Server port: 9933 <---> 31771



Which makes debugging the stuff that doesn't work (my code), quite difficult!
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Surpress Smartfox Logging information

Postby Lapo » 04 Apr 2017, 08:09

Sure, you can turn the logging level to WARN so that only warnings and errors will be logged.
See here:
http://docs2x.smartfoxserver.com/Gettin ... figuration

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 134 guests