• 3
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

We have the following pronblem. Once in a while, our application server spits out an empty logfile or (when it's in the weekend), there is no logfile at all.

We use logrotate for managing these logfiles and in both cases, we want logrotate to skip trying to rotate the empty or non-existing logfiles, since it is cluttering out rt-ticket bin and Nagios, since logrotate barfs at me in such a case.

Is there any way to do this in logrotate (of course I can write a script that does exactly that (skipping the empty and non-existing onces_, but that's not my question)

These two logrotate.conf options might help you:

missingok If the log file is missing, go on to the next one without issuing an error message. See also nomissingok.

notifempty Do not rotate the log if it is empty (this overrides the ifempty option).

For more information, see man logrotate.

  • 6
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags