You are not logged in.

#1 2008-11-13 11:13:11

flob
Member
Registered: 2008-07-12
Posts: 10

[SOLVED] Deleted /var/log/messages.log, doesn't log anymore?

Hi,

i deleted /var/log/messages.log in the hope it would reform and continue logging. I saved the old one to messages.log.old and deleted the original one.
nothing happened - i then created messages.log as an empty file and set the rights to be just as before, still nothing.
So my question is, how do i get back the messages.log as well as how do i trim log files to not have my system overflow?

Thanks
Flob

Last edited by flob (2008-11-13 13:57:27)

Offline

#2 2008-11-13 12:46:02

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [SOLVED] Deleted /var/log/messages.log, doesn't log anymore?

As far as I know, if the file is removed the system will re-create it again.
As a matter of face it will automatically spun the file when in becomes too log into messages.log.1, messages.log.2 etc.

R.

Offline

#3 2008-11-13 12:49:01

flob
Member
Registered: 2008-07-12
Posts: 10

Re: [SOLVED] Deleted /var/log/messages.log, doesn't log anymore?

well no, nothing is recreated, iam also 100% positive that the new file does not get written to sad the stuff that gets written to everything.log and should have been written to messages.log does not go into the new messages.log i created with the same rights/owner/group as the prev one.

Offline

#4 2008-11-13 13:07:18

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Deleted /var/log/messages.log, doesn't log anymore?

did you restart syslog-ng daemon?


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2008-11-13 13:47:30

flob
Member
Registered: 2008-07-12
Posts: 10

Re: [SOLVED] Deleted /var/log/messages.log, doesn't log anymore?

Yes, restarted syslog-ng, no messages.log was created... is it possible that messages.log is actually a link to another file, since it kept being filled when i renamed it to messages.log.old?

Edit: I restarted syslog-ng and provoked a message to be put into messages.log, the file was created and it is being logged to again! Thanks! smile

Last edited by flob (2008-11-13 13:58:52)

Offline

Board footer

Powered by FluxBB