Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Log rotate

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 7 months ago #230840 by ritapas
Log rotate was created by ritapas
Your LimeSurvey version: 3.28.20
Own server or LimeSurvey hosting: own
==================

Hello,
I need my Limesurvey log to rotate. It is a selfhosted Limesurvey 3.28.20

This is what I put in my config.php, it doesn't work...
Code:
               'log'=>array(
                        'class' => 'CLogRouter',
                        'routes' => array(
                                array(
                                        'class'=>'CFileLogRoute',
                                        'logPath'=>'/var/log/limesurvey/',
                                        'logFile'=>'application.log',
                                        #'levels'=>'trace, debug, info, error, warning',
                                        #'levels'=>'debug, info, error, warning',
                                        'levels'=>'info, error, warning',
                                        'maxLogFiles'=>'10',
                                        'maxFileSize'=>'12000',
                                ),
                        ),
                ),

Thank you a lot.
Rita.

 

Please Log in to join the conversation.

More
2 years 7 months ago #230895 by jelo
Replied by jelo on topic Log rotate
The application.log isn't written to /var/log/limesurvey/' by default.
Are you sure that PHP has write access to the path /var/log/limesurvey/'?
That would be very unusual.
Ask the server admin or use a path inside your home directory of your website.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 7 months ago #230910 by ritapas
Replied by ritapas on topic Log rotate
Hello, thank you for you reply.
The application actually logs to the path because we gave user apache permission to do so. On the other hand, I would expect the logs to rotate but it doesn't rotate, the current log actually grows indefinetily and I cannot find a way (http restart, php-fpm restart) to have a log rotation.

Please Log in to join the conversation.

More
2 years 7 months ago #230912 by jelo
Replied by jelo on topic Log rotate
Is this issue unsolved since years? Or did you found a solution to your posts a few years ago.
forums.limesurvey.org/forum/can-i-do-thi.../120949-log-rotation

I would first try to check f the log-rotation works when the default log path and the default values for maxFileSize and maxLogFiles are in place.
Perhaps the log rotating never worked in LimeSurvey. I recommend a bugreport, but you might need to reproduce the issue under LS5.




 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 7 months ago #230913 by ritapas
Replied by ritapas on topic Log rotate
the problem was apparently left unsolved but now I really would fix it. I could try with LS5, which I am currently trying to test... which is the default log path by the way?

Please Log in to join the conversation.

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 7 months ago #230965 by ritapas
Replied by ritapas on topic Log rotate
By the way, which action would trigger a log truncation? For instance, I see restarting the apache server in linux doesn't.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose