[geeklog-devel] 1.5 error.log when DB dies

Michael Jervis mjervis at gmail.com
Wed Aug 13 11:54:05 EDT 2008


Joe,

> How do you find the file? If you don't know where the log dir is, you don't
> know where the cache of the log dir is either. Now storing it in MEMCACHE
> might work but again, how do you find the unique key to your log dir in a
> system-wide Memcache. Option 3, putting it in siteconfig makes the most
> sense.

I think you have the wrong issue.

When installing Geeklog you set the log directory (default is /log IIRC)

If you changed it on install (or later) you know where it is.

The /problem/ is the /code/ knowing where to write issues when it
falls over getting the configuration. So it writes it wherever it is.
So if /public_html/calendar/events.php falls over you get
/public_html/calendar/error.log. Possibly an error.log in each folder
of your HTML part of the site, which would be publically available and
may expose information that aids an attack vector.

Having the /code/ cache the location of the log so it always writes it
to the correct place solves this problem, and the admin already knows
where to look. And if he doesn't he can always look in gl_config and
spot the path in the slightly bizarre serialised format, it's still
there and readable.

Other solutions?

In CVS you can override any config variable in siteconfig.php, we
could add something similar for "fallbacks" so in error.log if
$_CONF['log_path'] is not defined it goes to
$_CONF_FALLBACK['log_path'] which is defined in siteconfig.php, and
when that file is written by the installer it sets that var to what
ever is in the config?

I did have another idea but I got interupted by someone and I've gone
blank. Bum.

Mike



More information about the geeklog-devel mailing list