Skip to content

Commit

Permalink
로그 메시지에 UTC 시간 정보 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
rkttu committed Apr 1, 2024
1 parent 79f55e7 commit 16863a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TableCloth.CatalogBuilder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ static TextWriter PrepareOutputDirectory(string sourceDirectory, string targetDi
Directory.CreateDirectory(targetDirectory);

var logWriter = new StreamWriter(File.OpenWrite(Path.Combine(targetDirectory, "log.txt")), new UTF8Encoding(false)); ;
var utcNow = DateTimeOffset.UtcNow;

logWriter.WriteLine(Console.Out, $"Info: UTC Date, time and timezone - {utcNow.ToUniversalTime()}");
logWriter.WriteLine(Console.Out, $"Info: Copying all sub-items in `{sourceDirectory}` directory to `{targetDirectory}` directory...");
CopyAll(logWriter, sourceDirectory, targetDirectory, true);
return logWriter;
Expand Down

0 comments on commit 16863a1

Please sign in to comment.