Don't try to log until we have the basic framework initialized.
Don't throw Exception if logMessage() was called before framework was
initialized; ignore instead.
static public function logMessage($event, $priority = null,
array $options = array())
{
- if (!isset($GLOBALS['injector'])) {
- throw new Horde_Exception('The default environment is missing. Unable to write log entries!');
+ /* Chicken/egg: wait until we have basic framework setup before we
+ * start logging. */
+ if (isset($GLOBALS['conf'])) {
+ $options['trace'] = 2;
+ $GLOBALS['injector']->getInstance('Horde_Log_Logger')->log($event, $priority, $options);
}
- $options['trace'] = 2;
- $GLOBALS['injector']->getInstance('Horde_Log_Logger')->log($event, $priority, $options);
}
/**