You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for creating this sink! It is a very useful addition.
Came across this issue :
To create a new bag with half the items , following code is used in LogBuffer.cs Bag = new ConcurrentBag<LogEvent>(logEvents.Take(Math.Max(1, config.BufferCapacity / 2)));
This uses "Take" which retrieves first 'n' elements (based on buffer capacity).
Consider the scenario:
BufferCapacity to 15
buffer all Debug messages (Say message 1 to message 19)
an error event happens after all the above debug messages
Issue:While Creating / PruningLogEntries : Instead of fetching last "n" entries from buffer , first "n" entries are fetched , which makes the log messages not sequential
Log message looks like:
2022-12-28 04:05:44.599|[ERR]|This is a trigger|
2022-12-28 04:05:44.596|[DBG]||Message Line number 0
2022-12-28 04:05:44.596|[DBG]|Message Line number 1
2022-12-28 04:05:44.596|[DBG]|Message Line number 2
2022-12-28 04:05:44.596|[DBG]|Message Line number 3
2022-12-28 04:05:44.596|[DBG]|Message Line number 4
2022-12-28 04:05:44.596|[DBG]|Message Line number 5
2022-12-28 04:05:44.599|[DBG]|Message Line number 15
2022-12-28 04:05:44.599|[DBG]|Message Line number 16
2022-12-28 04:05:44.599|[DBG]|Message Line number 17
2022-12-28 04:05:44.599|[DBG]|Message Line number 18
2022-12-28 04:05:44.599|[DBG]|Message Line number 19
Solution : use "TakeLast " to retrieve last "n" messages
The text was updated successfully, but these errors were encountered:
Thanks for creating this sink! It is a very useful addition.
Came across this issue :
To create a new bag with half the items , following code is used in LogBuffer.cs
Bag = new ConcurrentBag<LogEvent>(logEvents.Take(Math.Max(1, config.BufferCapacity / 2)));
This uses "Take" which retrieves first 'n' elements (based on buffer capacity).
Consider the scenario:
Issue: While Creating / PruningLogEntries : Instead of fetching last "n" entries from buffer , first "n" entries are fetched , which makes the log messages not sequential
Log message looks like:
2022-12-28 04:05:44.599|[ERR]|This is a trigger|
2022-12-28 04:05:44.596|[DBG]||Message Line number 0
2022-12-28 04:05:44.596|[DBG]|Message Line number 1
2022-12-28 04:05:44.596|[DBG]|Message Line number 2
2022-12-28 04:05:44.596|[DBG]|Message Line number 3
2022-12-28 04:05:44.596|[DBG]|Message Line number 4
2022-12-28 04:05:44.596|[DBG]|Message Line number 5
2022-12-28 04:05:44.599|[DBG]|Message Line number 15
2022-12-28 04:05:44.599|[DBG]|Message Line number 16
2022-12-28 04:05:44.599|[DBG]|Message Line number 17
2022-12-28 04:05:44.599|[DBG]|Message Line number 18
2022-12-28 04:05:44.599|[DBG]|Message Line number 19
Solution : use "TakeLast " to retrieve last "n" messages
The text was updated successfully, but these errors were encountered: