Welcome to the LimeSurvey Community Forum

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

log rotation

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 11 months ago #197737 by ritapas
log rotation was created by ritapas
Hello,
this is a question for LimeSurvey CE.

We see in framework/logging/CFileLogRoute.php there are options for log rotations:
Code:
* @property string $logPath Directory storing log files. Defaults to application runtime path.
* @property string $logFile Log file name. Defaults to 'application.log'.
* @property integer $maxFileSize Maximum log file size in kilo-bytes (KB). Defaults to 1024 (1MB).
* @property integer $maxLogFiles Number of files used for rotation. Defaults to 5.

Where can I set those properties in the application? Or- how can I set those in the config.php file?

Our LS version is 3.15.4

Thank you.
The topic has been locked.
  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 11 months ago #197749 by ritapas
Replied by ritapas on topic log rotation
I've found a way in the config.php file. Maybe this is the only way but... is there documentation about this?

Code:
                                array(
                                        'class'=>'CFileLogRoute',
                                        'logPath'=>'/var/log/limesurvey/',
                                        'logFile'=>'application.log',
                                        'levels'=>'trace, debug, info, error, warning',
                                        'maxLogFiles'=>'5',
                                        'maxFileSize'=>'1000',
                                ),
 
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197786 by DenisChenu
Replied by DenisChenu on topic log rotation

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: ritapas
The topic has been locked.
  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 11 months ago #197789 by ritapas
Replied by ritapas on topic log rotation
I had completely missed the optional_settings part.
Sorry!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197799 by DenisChenu
Replied by DenisChenu on topic log rotation
Maybe this page have a bad name …

Advanced settings ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: ritapas
The topic has been locked.
  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 11 months ago #197838 by ritapas
Replied by ritapas on topic log rotation
I am not sure. Maybe I would find a place in the installation guide to mention this part of the manual, to make sure that the most inattentive people knows about it!
The topic has been locked.
  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 7 months ago - 3 years 7 months ago #204466 by ritapas
Replied by ritapas on topic log rotation
Hello,
I see that in our 3.15.4 LS the log rotation mechanism is not working.
The setting is as follows
Code:
               'log'=>array(
                        'class' => 'CLogRouter',
                        'routes' => array(
                                array(
                                        'class'=>'CFileLogRoute',
                                        'logPath'=>'/var/log/limesurvey/',
                                        'logFile'=>'application.log',
                                        'levels'=>'info, error, warning',
                                        'maxLogFiles'=>'10',
                                        'maxFileSize'=>'12000',
                                ),
 
 
                        ),
                ),
 
 
But the current log is now 41 Mb.

Is this a bug solved in a newer version or an error in my config?
Thank you a lot.
Last edit: 3 years 7 months ago by ritapas.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose