Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/ProjectOrigin.ServiceCommon/Database/DatabaseUpgrader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
var started = DateTime.UtcNow;
while (!upgradeEngine.TryConnect(out string msg))
{
_logger.LogWarning("Failed to connect to database ({message}), waiting to retry in {sleepTime} seconds... ", msg, _sleepTime.TotalSeconds);

Check warning on line 55 in src/ProjectOrigin.ServiceCommon/Database/DatabaseUpgrader.cs

View workflow job for this annotation

GitHub Actions / analyse / sonar-analysis

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)

Check warning on line 55 in src/ProjectOrigin.ServiceCommon/Database/DatabaseUpgrader.cs

View workflow job for this annotation

GitHub Actions / analyse / sonar-analysis

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
await Task.Delay(_sleepTime);

if (DateTime.UtcNow - started > _timeout)
Expand Down Expand Up @@ -82,19 +82,22 @@
_logger = logger;
}

public void WriteError(string format, params object[] args)
{
_logger.LogError(format, args);
}
public void LogTrace(string format, params object[] args) =>
_logger.LogTrace(format, args);

public void WriteInformation(string format, params object[] args)
{
public void LogDebug(string format, params object[] args) =>
_logger.LogDebug(format, args);

public void LogInformation(string format, params object[] args) =>
_logger.LogInformation(format, args);
}

public void WriteWarning(string format, params object[] args)
{
public void LogWarning(string format, params object[] args) =>
_logger.LogWarning(format, args);
}

public void LogError(string format, params object[] args) =>
_logger.LogError(format, args);

public void LogError(Exception ex, string format, params object[] args) =>
_logger.LogError(ex, format, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="dbup-postgresql" Version="5.0.40" />
<PackageReference Include="dbup-postgresql" Version="6.0.3" />
<PackageReference Include="Grpc.AspNetCore" Version="2.62.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
<PackageReference Include="Npgsql" Version="8.0.3" />
<PackageReference Include="Npgsql" Version="9.0.2" />
<PackageReference Include="Npgsql.OpenTelemetry" Version="8.0.3" />
<PackageReference Include="OpenTelemetry" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.0" />
Expand Down
Loading