Yii Framework Forum: Clogrouter Logpath On Linux Not Working - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Clogrouter Logpath On Linux Not Working Rate Topic: -----

#1 User is offline   yoavre 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 03-October 11

Posted 16 January 2013 - 09:20 AM

I have the following in my config/main.php:

'log' => array(
'class' => 'CLogRouter',
'routes' => array(
array(
'class' => 'CFileLogRoute',
'levels' => 'error, warning',
'logPath' => log_dir
),
),
),

On windows the logPath is used and the application.log is put on the new directory.
On linux I put a valid path ('/local/logs') with 777 permissions.
No application.log is created.
If I comment out the logPath property, the application.log is created under 'app/protected/runtime'.

Any ideas?
0

#2 User is offline   rootbear 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 225
  • Joined: 17-June 11

Posted 16 January 2013 - 09:40 AM

mimic your setting and it works, try

chmod 777 /local/
chmod 777 /local/logs

I enjoy the Yii.sy coding life here.
0

#3 User is offline   yoavre 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 03-October 11

Posted 16 January 2013 - 09:51 AM

stupid me, i was looking for the log under /local/logs/app
it works fine

thanks for the quick response!

BTW chmod 777 is needed just for the directory itself, no need for the parent directories.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users