Fix CardReaderService.conf for supervisorctl to ensure correct pathing as per install directories. Correct MessageLogger to ensure it appends log messages, previously overwrote the logs. Add manual Reset event in Service1.cs to ensure that we exit when we stop. Add configurationmanager/config property, to allow DataCenterHelper to pull updated configurations at runtime. Add TimeStamp to CardDataPost object #103
21 lines
488 B
C#
21 lines
488 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Logger
|
|
{
|
|
public class MessageLogger
|
|
{
|
|
private static string _logPath = "log.txt";
|
|
|
|
public static void Log(string message)
|
|
{
|
|
Console.WriteLine(message);
|
|
File.AppendAllText(_logPath, string.Format("{0} | {1}{2}", DateTime.Now, message, Environment.NewLine));
|
|
}
|
|
}
|
|
}
|