Couple Log Q's

edited August 2011 in Photon Server
Hi guys,

Just a couple of question in relation to logging, mainly because I've got my game lop running and that's starting to pump out a lot of data.

1) How much data can one log before risking instability?

Are there any hard limits, or is it just up to the system resources available?

2) How does/can one tell the logger to use a different file from default?

Ideally I'd make a new folder for every instance of my application (e.g. restart), with separate files for every game room and game engine (I've attached to a room).

I can handle the path/file naming, would just like to know how to create a log with a given path.

Thanks!

Comments

  • On the server you setup loggin in your application with:

    LogManager.SetLoggerFactory(Log4NetLoggerFactory.Instance);
    XmlConfigurator.ConfigureAndWatch(new FileInfo("bin\\log4net.config"));

    Now in log4net.config you can config the log file name/position, max file size and if you want to append or not. Note that the settings are compiled and you can't tweak them in the deploy folder at run-time.

    Client side it depends if you use Unity or something else. I use the Unity logging.
  • lazalong, I have logging already working, my question is can I (programmaticly) tell my logger which file to write to?

    For example, even at 3fps my game engine outputs a lot of data, add in multiple rooms each with it's own game engine...

    Ideally I'd have:

    Logs(28_08_11)
    • Application.txt
    • Lobby.txt
    • Room1.txt
    • Room1_GameEngine.txt
    • ...
Sign In or Register to comment.