altf4 / RealTimeTactics

Real Time Tactics (RTT) Game
GNU General Public License v3.0
6 stars 4 forks source link

Ogre client doesn't log to system log location (/var/log/) #42

Open altf4 opened 12 years ago

altf4 commented 12 years ago

Looks like a permissions thing. Usually this isn't a problem because you don't try to write to the directory yourself. You're supposed to use syslog to do it. Maybe OGRE isn't using syslog to do logs, but rather writes directly to the file itself. If so, we'll have to figure something else out.

altf4 commented 12 years ago

Note that when running from a relative directory (such as when in Eclipse) that the log file is written to the current directory and not /var/log/, so this Issue doesn't apply there

echofourpapa commented 12 years ago

Here's the documentation for the log manager class: By default, Root will instantiate a LogManager (which becomes the Singleton instance) on construction, and will create a default log based on the Root construction parameters. If you want more control, for example redirecting log output right from the start or suppressing debug output, you need to create a LogManager yourself before creating a Root instance, then create a default log. Root will detect that you've created one yourself and won't create one of its own, thus using all your logging preferences from the first instance.

More info can be found here: http://www.ogre3d.org/docs/api/html/classOgre_1_1LogManager.html

But on line 139(in AdvanceOgreFramework.cpp), in creataLog(string,bool,bool,bool), the first boolean value is whether or not to use the default log, and a setting of true will use the default log. False should allow it to write to /var/log