Modified log folder path

This commit is contained in:
2020-11-26 10:01:47 +01:00
parent bcbab1383a
commit aa39597541
3 changed files with 10 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ namespace Birdmap.API.Controllers
public class LogsController : ControllerBase
{
private readonly ILogger<LogsController> _logger;
private readonly string _logFolderPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Log");
private readonly string _logFolderPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Logs");
public LogsController(ILogger<LogsController> logger)
{
@@ -27,7 +27,7 @@ namespace Birdmap.API.Controllers
[HttpGet("all")]
public ActionResult<List<string>> GetAll()
{
_logger.LogInformation($"Getting all log filenames...");
_logger.LogInformation($"Getting all log filenames from folder: '{_logFolderPath}'...");
return Directory.EnumerateFiles(_logFolderPath, "*.log")
.Select(f => Path.GetFileName(f))