Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - Logfile suggestion
  FAQ FAQ  Forum Search   Register Register  Login Login

Logfile suggestion

 Post Reply Post Reply
Author
Roman View Drop Down
Newbie
Newbie


Joined: 04 November 2005
Location: Russian Federation
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roman Quote  Post ReplyReply Direct Link To This Post Topic: Logfile suggestion
    Posted: 27 June 2006 at 6:45am
Hello Roberto,

Is it possible to open logfiles NON exclusevely for reading, but exclusevely for writing of course (as it does MS IIS, for example) so it will be possible to view it in real time by compatible viewers (I usually use FAR Manager for fast troubleshouting/monitoring)?

Thank you.
Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4106
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 1:28pm
Roman,

SpamFilter by default will update the logfile every 60 seconds. The logfile should not be locked by other applications, or that will prevent SpamFilter from writing to it. In theory opening the file for read-only access, and placing no locks on it should work, but this is really not tested...
We're actually working on writing logfiles in a slightly different way in the next 3.1 version, allowing "safer" access to 3rd party applications.
Roberto Franceschetti

LogSat Software

Spam Filter ISP
Back to Top
Roman View Drop Down
Newbie
Newbie


Joined: 04 November 2005
Location: Russian Federation
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roman Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 3:45pm
Roberto,

As I can see, SpamFilter opens logfile every 60 seconds, writes to it, and closes again. Therefore I can open this file for reading AND even for writing in this period. So when spamfilter tries to reopen it again - it can't place lock for writing and drops error in realtime logmonitor window.

Instead of Spamfilter IIS (as mentioned above) opens logfiles exclusively for writing, but do not block reading (may be not for writing, but "append", I don't remember the certain attributes in fopen() ). IIS don't close the file until it stops. So I can not open it for writing (while IIS works), but I can copy it and I can view it without preventing IIS to access the file. In fact I can even see how new lines are added to it in realtime without reopening the file.

I think, as long as Spamfilter does not need to read the logfile itself or write in voluntary position, it is enough to open logfile in "append" mode and do not close it while application runs. It's only a matter of changing attribute in fopen() and open-close-reopen-... sequence.

Edited by Roman
Back to Top
Roman View Drop Down
Newbie
Newbie


Joined: 04 November 2005
Location: Russian Federation
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roman Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 3:57pm
This also allow 3rd party [web]log processing applications to access logfiles without copying it or blocking the running application.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.336 seconds.