Skip to content

Commit

Permalink
Fix loggers partagés entre générateurs (qui se marchaient dessus main…
Browse files Browse the repository at this point in the history
…tenant que ça tourne en parallèle)
  • Loading branch information
JabX committed May 10, 2024
1 parent a6c10f6 commit b8c0ca5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TopModel.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ void HandleFile(FileInfo file)
else
{
var services = new ServiceCollection()
.AddLogging(builder => builder.AddProvider(loggerProvider))
.AddTransient(typeof(ILogger<>), typeof(Logger<>))
.AddTransient<ILoggerFactory, LoggerFactory>()
.AddSingleton<ILoggerProvider>(loggerProvider)
.AddModelStore(fileChecker, config, dn);

var hasError = false;
Expand Down

0 comments on commit b8c0ca5

Please sign in to comment.