Hi Hendrik,
You mentioned "scanning" a log file. Can you confirm that you're using a log file package to monitor a text-based log?
EventSentry only opens files it monitors with READ access in SHARED mode, it should not lock any files it's monitoring. Otherwise EventSentry wouldn't really be able to monitor any log file without breaking the underlying application. What type of error message are you receiving in your application?
What happens if you open the file in a text editor like notepad, can you view it and append data to it?
Yes, I think I do.
Please find the error and screenshot from EventSentry in attachement.
I can open and view the file when running the underlying application.
Regards,
From the limited information I have this seems to be an issue with the 3rd party application that is apparently trying to lock/open the file exclusively? As I mentioned before, EventSentry has been monitoring log files the same way for years, and our customers are utilizing this functionality extensively - with a variety of log file types. We've never seen an issue with that.
There are a few things you can try:
1. While EventSentry is running, open the log file with a text editor (e.g. notepad.exe) and see if you can add a test line to the log file and SAVE the file. Does that work?
2. You can also download "Process Explorer" from Sysinternals, make sure you launch it as Administrator. Then, choose "Find ..." from the "Find" menu, and search for the log file in question. Does EventSentry show up as a process referencing that file?
Thanks for the response,
1. Yes, I can append data with notepad++ or powershell.
Add-content .\MicroTechJobs.LOG "Select a valid folder and try again"
I use this command to test if EventSentry sends a mail when the string"Select..." is found in the log file in question. Witch it does.
2. "Process Explorer" does not find the log file question. It does find other log files that I'm monitoring without an issue.
The OS is Windows 7.
If you can append data with Notepad or PowerShell, then that would indicate that EventSentry is not locking the file.
Are you able to get in touch with the vendor of the application that is throwing the error? It looks like they are incorrectly throwing this error, likely because they are opening the file incorrectly.
If the application cannot be changed, then the only work-around I could think of, is creating a recurring script (that runs every minute or so), which copies the log file of the MicroTech application to another (temporary) log file, and then configure EventSentry to monitor that log file. Is it the same log file name or does it contain date/time variables?
I created a little script that copies the file every minute. I can log that file with EvenSentry while the Microtech application is running.So, problem solved.
Thanks for your help.
Kind regards,
Wonderful, I'm glad that works. You're welcome!
Hendrik Van Dorsselaer
Hi,
I'm testing EventSentry Free edition. Works great.
But now I'm trying to scan a logfile from a legaccy application on WIN7. When doing so the application does not run because the logfile is claimed by EventSentry.
Could I get some advice for this issue?
Kind regards,