Skip to content

Commit 01b4957

Browse files
committed
Enable autoflush for tailable logs.
1 parent a9094a2 commit 01b4957

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PSql.Deploy/Migrations/CmdletMigrationConsole.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public TextWriter CreateLog(M.IMigrationApplication info)
4949
var database = info.Target.DatabaseDisplayName;
5050
var fileName = $"{server}.{database}.{(int) phase}_{phase}.log".SanitizeFileName();
5151

52-
return new StreamWriter(Path.Combine(logPath, fileName));
52+
return new StreamWriter(Path.Combine(logPath, fileName)) { AutoFlush = true };
5353
}
5454

5555
/// <inheritdoc/>

PSql.Deploy/Seeds/CmdletSeedConsole.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public TextWriter CreateLog(S.ISeedApplication info)
5050
var fileName = $"{target}.{seed}.log".SanitizeFileName();
5151

5252
return TextWriter.Synchronized(
53-
new StreamWriter(Path.Combine(_logPath, fileName))
53+
new StreamWriter(Path.Combine(_logPath, fileName)) { AutoFlush = true }
5454
);
5555
}
5656

0 commit comments

Comments
 (0)