Thanks David that might be the way to go. Ideally I could convince
task logging to go to the log files instead, at least when there's an
environment.

On Oct 30, 4:26 pm, David Ashwood <da...@inspiredthinking.co.uk>
wrote:
> $loggingStateBefore = sfConfig::set('sf_logging_enabled',false);
> sfConfig::set('sf_logging_enabled' ,false);
>
> //
> // Your process ideally in a try/catch to ensure you can re-enable it
> // again
> //
>
> sfConfig::set('sf_logging_enabled',$loggingStateBefore);
>
> I think there are only 2 settings you might need to record/set:
> sf_logging_enabled & sf_debug
>
>
>
> On Fri, 2009-10-30 at 17:07 -0400, Tom Boutell wrote:
> > I've written a task that needs privileges that are normally checked
> > for based on the identity of the current user. So I set up an identity
> > just for the tasks, and that's working fine:
>
> >     $context = 
> > sfContext::createInstance($this->createConfiguration($options['application' 
> > ],
> > $options['env']));
> >     
> > $context->getUser()->signin(Doctrine::getTable('sfGuardUser')->findOneByUse 
> > rname('pktaskuser'),
> > false);
>
> > However, when I create an application configuration like this, Symfony
> > logs a whole slew of information about the routing table. And all of
> > that information winds up at the console:
>
> > >> sfPatternRouting Connect sfDoctrineRoute "pk_user_admin" 
> > >> (/admin/user.:sf_format)
> > >> sfPatternRouting Connect sfDoctrineRoute "pk_user_admin_new" 
> > >> (/admin/user/new.:sf_format)
> > >> sfPatternRouting Connect sfDoctrineRoute "pk_user_admin_create" 
> > >> (/admin/user.:sf_format)
> > >> sfPatternRouting Connect sfDoctrineRoute "pk_user_admin_edit" 
> > >> (/admin/user/:id/edit.:sf_format)
>
> > ... etc etc etc.
>
> > I've done enough digging to know that this is coming from the command
> > line task logging handler.
>
> > Command line tasks should be quiet when everything is working as it
> > should. Is there a way to shut off this noisy "logging" without
> > disabling actual logging during web access to the app?
>
> > (Perhaps it would run quieter if the environment was not dev? In that
> > case I can live with it in dev, knowing it will shut up on
> > production.)
>
> > Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to