You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
483 B
21 lines
483 B
using System;
|
|
using System.IO;
|
|
using System.Text;
|
|
|
|
namespace BasicServer.Arch {
|
|
|
|
public class DatePrefix : TextWriter {
|
|
|
|
private readonly TextWriter _originalOut;
|
|
|
|
public DatePrefix() {
|
|
_originalOut = Console.Out;
|
|
}
|
|
|
|
public override Encoding Encoding => new ASCIIEncoding();
|
|
|
|
public override void WriteLine(string value) {
|
|
_originalOut.WriteLine($"{DateTime.Now} {value}");
|
|
}
|
|
}
|
|
}
|
|
|