You have a c# app.
I have created my own logging file.
When my app is running I would open this log file. Then I would like to see the changes occurring, whilst the app is running and 'recording'.
I have looked around, but all I could find is how to read a file, that is being updated rather than the other way round.
I only have this so far...
protected void LogSync(string message)
{
try
{
lock (SynLock)
{
using (var sw = new StreamWriter(SyncFilename, true))
{
sw.Write(message + Environment.NewLine);
sw.Close();
}
}
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}