Based on his questions, he is not using a windows event log and he seems to
just be using his own log file design.  Nothing in his post says that he
does or does not have control over the format of the log file.  If so, he
may be able to use XML.  If that is the case, which we cannot really tell
unless he lets us know, he could use an XML file to hold the entries.  Using
XML allows for much easier access than a text based log file.  In XML you
can specify the location that you want to add a new node or element to.
For example...

<LogFile>
    <Entry Timestamp="2005-12-25-06:01:59:0000" Type="" Text="This is a
sample entry" />
</LogFile>

With XML you can insert an element anywhere you want.  I can insert them
before of after the last entry, before the first entry, or I can select one
and insert the record before or after it.

My point was that if he designed his own log file format, he can do whatever
he wishes and could use XML for this.  Of course, he may not be able to use
XML if he is not controlling the log file format, which is why I asked the
question.

I personally use XML for this sort of log file all of the time.  It's easy
to build viewers via in windows or web that can have a lot of functionality.

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Johnson
Sent: Friday, November 18, 2005 9:00 AM
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] Writing data to the beginning of a file

On 11/18/05, Jon Rothlander <[EMAIL PROTECTED]> wrote:
>
> Can you use XML? If so, you can easily handle this using an XML log file.
>


How?

Steve Johnson

===================================
This list is hosted by DevelopMentorR  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to