mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-04-22 07:06:39 +00:00
less logs
This commit is contained in:
@@ -85,8 +85,6 @@ if (!migrator.RunMigrations())
|
||||
var storageConfig = app.Configuration.GetSection("StorageConfig").Get<StorageConfig>() ?? new StorageConfig();
|
||||
Directory.CreateDirectory(storageConfig.TilesDirectory);
|
||||
Directory.CreateDirectory(storageConfig.ReadyDirectory);
|
||||
logger.LogInformation("Storage directories created: Tiles={TilesDir}, Ready={ReadyDir}",
|
||||
storageConfig.TilesDirectory, storageConfig.ReadyDirectory);
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
@@ -125,9 +123,6 @@ async Task<IResult> GetTileByLatLon([FromQuery] double Latitude, [FromQuery] dou
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.LogInformation("Getting tile at ({Lat}, {Lon}) with zoom level {Zoom}",
|
||||
Latitude, Longitude, ZoomLevel);
|
||||
|
||||
var downloadedTile = await downloader.DownloadSingleTileAsync(
|
||||
Latitude,
|
||||
Longitude,
|
||||
@@ -152,7 +147,6 @@ async Task<IResult> GetTileByLatLon([FromQuery] double Latitude, [FromQuery] dou
|
||||
};
|
||||
|
||||
await tileRepository.InsertAsync(tileEntity);
|
||||
logger.LogInformation("Tile saved to database with ID: {Id}", tileEntity.Id);
|
||||
|
||||
var response = new DownloadTileResponse
|
||||
{
|
||||
@@ -198,9 +192,6 @@ async Task<IResult> RequestRegion([FromBody] RequestRegionRequest request, IRegi
|
||||
return Results.BadRequest(new { error = "Size must be between 100 and 10000 meters" });
|
||||
}
|
||||
|
||||
logger.LogInformation("Region request received: ID={Id}, Lat={Lat}, Lon={Lon}, Size={Size}m, Zoom={Zoom}, Stitch={Stitch}",
|
||||
request.Id, request.Latitude, request.Longitude, request.SizeMeters, request.ZoomLevel, request.StitchTiles);
|
||||
|
||||
var status = await regionService.RequestRegionAsync(
|
||||
request.Id,
|
||||
request.Latitude,
|
||||
@@ -242,36 +233,6 @@ async Task<IResult> CreateRoute([FromBody] CreateRouteRequest request, IRouteSer
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.LogInformation("Route creation request: ID={Id}, Name={Name}, Points={PointCount}, RegionSize={RegionSize}m, Zoom={Zoom}, RequestMaps={RequestMaps}",
|
||||
request.Id, request.Name, request.Points.Count, request.RegionSizeMeters, request.ZoomLevel, request.RequestMaps);
|
||||
|
||||
if (request.Points.Count > 0)
|
||||
{
|
||||
var firstPoint = request.Points[0];
|
||||
logger.LogInformation("First point: Lat={Lat}, Lon={Lon}", firstPoint.Latitude, firstPoint.Longitude);
|
||||
}
|
||||
|
||||
if (request.Geofences != null)
|
||||
{
|
||||
logger.LogInformation("Geofences object received: Polygons count = {Count}", request.Geofences.Polygons?.Count ?? 0);
|
||||
|
||||
if (request.Geofences.Polygons != null)
|
||||
{
|
||||
for (int i = 0; i < request.Geofences.Polygons.Count; i++)
|
||||
{
|
||||
var polygon = request.Geofences.Polygons[i];
|
||||
logger.LogInformation("Geofence {Index}: NorthWest = {NW}, SouthEast = {SE}",
|
||||
i,
|
||||
polygon.NorthWest is not null ? $"({polygon.NorthWest.Lat}, {polygon.NorthWest.Lon})" : "null",
|
||||
polygon.SouthEast is not null ? $"({polygon.SouthEast.Lat}, {polygon.SouthEast.Lon})" : "null");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogInformation("No geofences provided (Geofences is null)");
|
||||
}
|
||||
|
||||
var route = await routeService.CreateRouteAsync(request);
|
||||
return Results.Ok(route);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
"Serilog": {
|
||||
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
|
||||
"MinimumLevel": {
|
||||
"Default": "Information",
|
||||
"Default": "Warning",
|
||||
"Override": {
|
||||
"Microsoft.AspNetCore": "Warning",
|
||||
"SatelliteProvider.Services.RegionRequestQueue": "Debug",
|
||||
"SatelliteProvider.Services.GoogleMapsDownloaderV2": "Debug"
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"WriteTo": [
|
||||
|
||||
Reference in New Issue
Block a user