473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Missing Entries From Logs

1
i have a log file which doesnot have complete data.
my tables have more number of records as compared to log file.
i am using webservices.
the logs get updated after the tables are updated and i am using mutex to handle multiple requests but i am not able to get all the record in log file as in table.
Is there any Timeout occuring which will cause my logs to stop writing in between or there is a problem with mutex..

Private Sub WriteToLog(ByVal Content As String)

Dim mutexFile As Mutex = New Mutex(False, "OPS_LogFileMutex")

Try
mutexFile.WaitOne() 'Wait until the file is open
Log(Content, _logFilePath & "\" & _logFileName)
Catch ex As Exception
Finally
mutexFile.ReleaseMutex()
End Try


Private Sub Log(ByVal Content As String, ByVal FileName As String)
Dim LogFile As New StreamWriter(FileName, True)
Try
LogFile.WriteLine(Content)
Catch ex As Exception
System.Diagnostics.EventLog.WriteEntry("TESTServic e", ex.Message)
Finally
LogFile.Close()
End Try
Mar 17 '08 #1
0 686

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Ryann | last post by:
Hello. I had a strange entry in my referrer logs. The http-referrer reported that the user came from another site. But the file it claimed to come from a pdf file. I followed the link back and...
5
by: Annette Massie | last post by:
I have a park permit tracking database where I was thinking of having the user enter all the park permits individually, however realized that in a day, a park could host many daily users. So if 100...
9
by: Harsha Srinath | last post by:
Athough this might not be directly relayed to C syntax, I thought some of you may find this an interesting problem :- 1.One number, in an array integers from 1 to 1,000,000 is present twice. How...
0
by: Ken Allen | last post by:
I have some experience with the use of the Event Log with older applications, and even writing kernel components, where we create our custom MSG file for the messages associated with the Event Log...
0
by: kris | last post by:
hi can any one help me out, i have written a code for Word Indexing using Dll's i think this is an incomplete code for WORD INDEX. I had encountered this error "Error! No index entries found"...
3
by: David Davidson | last post by:
I'm just wondering if anybody's seen a problem with their web server recently that's similar to the following: about two weeks ago some clients on our intranet started experiencing lost sessions -...
7
by: Jed Parsons | last post by:
Hi, I'm using the logging module for the first time. I'm using it from within Zope Extensions. My problem is that, for every event logged, the logger is producing multiple identical entries...
9
by: Suman | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows...
7
by: =?Utf-8?B?U3RldmVU?= | last post by:
I have a small app which tries reading the system, application, and security event logs within Vista. Many of the event logs return with a generic sentance indicating that: "The description for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.