Commit 104eeacd authored by AntekZ's avatar AntekZ

small changes 2

parent 63d6d367
...@@ -106,7 +106,7 @@ namespace LcdLogger.Services ...@@ -106,7 +106,7 @@ namespace LcdLogger.Services
await _fileStream.FlushAsync(cancellationToken); await _fileStream.FlushAsync(cancellationToken);
await _fileStream.DisposeAsync(); await _fileStream.DisposeAsync();
var justClosedFile = _currentPath; //var justClosedFile = _currentPath;
//_ = Task.Run(async () => //_ = Task.Run(async () =>
//{ //{
......
...@@ -8,7 +8,7 @@ namespace LcdLogger.Services ...@@ -8,7 +8,7 @@ namespace LcdLogger.Services
{ {
private readonly Channel<LogBatch> _channel; private readonly Channel<LogBatch> _channel;
//dostep do mechanizmu czytania buforu // access to buffer reading mechanism
public readonly ChannelReader<LogBatch> Reader; public readonly ChannelReader<LogBatch> Reader;
public LogQueue(IOptions<LogOptions> options) public LogQueue(IOptions<LogOptions> options)
...@@ -20,13 +20,13 @@ namespace LcdLogger.Services ...@@ -20,13 +20,13 @@ namespace LcdLogger.Services
SingleWriter = false SingleWriter = false
}; };
//bufor w pamieci Ram - trzyma kolejke batchy // in-memory buffer holding a queue of batches
_channel = Channel.CreateBounded<LogBatch>(channelOptions); _channel = Channel.CreateBounded<LogBatch>(channelOptions);
Reader = _channel.Reader; Reader = _channel.Reader;
} }
// wpuszcza LogBatch z endpointu do kolejki // pushes a LogBatch from the endpoint into the queue
public bool TryEnqueue(LogBatch batch) public bool TryEnqueue(LogBatch batch)
{ {
return _channel.Writer.TryWrite(batch); return _channel.Writer.TryWrite(batch);
......
{ {
"Log": {
"Directory": "/var/log/lcd-logger",
"RotateAtBytes": 2097152,
"MaxTotalBytes": 104857600,
"MinLevel": 2,
"MaxBatchEntries": 100,
"QueueCapacity": 250
},
"Kestrel": {
"Endpoints": {
"Http": { "Url": "http://127.0.0.1:8082" }
},
"Limits": {
"MaxRequestBodySize": 2097152
}
},
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning"
} }
} },
"AllowedHosts": "127.0.0.1"
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment