Logfile suggestion |
Post Reply
|
| Author | |
Roman
Newbie
Joined: 04 November 2005 Location: Russian Federation Status: Offline Points: 32 |
Post Options
Thanks(0)
Quote Reply
Topic: Logfile suggestionPosted: 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. |
|
![]() |
|
LogSat
Admin Group
Joined: 25 January 2005 Location: United States Status: Offline Points: 4106 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Roman
Newbie
Joined: 04 November 2005 Location: Russian Federation Status: Offline Points: 32 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Roman
Newbie
Joined: 04 November 2005 Location: Russian Federation Status: Offline Points: 32 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.336 seconds.


Topic Options
Post Options
Thanks(0)


