Updated
This commit is contained in:
@@ -261,7 +261,7 @@ namespace EonaCat.Logger.Server
|
|||||||
{
|
{
|
||||||
char[] buffer = new char[8192]; // 8KB buffer size for large data
|
char[] buffer = new char[8192]; // 8KB buffer size for large data
|
||||||
int bytesRead;
|
int bytesRead;
|
||||||
StringBuilderChill logData = new StringBuilderChill();
|
StringBuilder logData = new StringBuilder();
|
||||||
|
|
||||||
while ((bytesRead = await reader.ReadAsync(buffer, 0, buffer.Length)) > 0)
|
while ((bytesRead = await reader.ReadAsync(buffer, 0, buffer.Length)) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using EonaCat.Json;
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|||||||
@@ -100,13 +100,13 @@ namespace EonaCat.Logger.Extensions
|
|||||||
|
|
||||||
private static string DumpTree(object currentObject, int? maxDepth, int? maxCollectionItems)
|
private static string DumpTree(object currentObject, int? maxDepth, int? maxCollectionItems)
|
||||||
{
|
{
|
||||||
var stringBuilder = new StringBuilderChill();
|
var stringBuilder = new StringBuilder();
|
||||||
var visitedHashSet = new HashSet<object>(new ReferenceEqualityComparer());
|
var visitedHashSet = new HashSet<object>(new ReferenceEqualityComparer());
|
||||||
DumpTreeInternal(currentObject, stringBuilder, 0, visitedHashSet, maxDepth, maxCollectionItems);
|
DumpTreeInternal(currentObject, stringBuilder, 0, visitedHashSet, maxDepth, maxCollectionItems);
|
||||||
return stringBuilder.ToString();
|
return stringBuilder.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DumpTreeInternal(object currentObject, StringBuilderChill stringBuilder, int indent, HashSet<object> visited, int? maxDepth, int? maxCollectionItems)
|
private static void DumpTreeInternal(object currentObject, StringBuilder stringBuilder, int indent, HashSet<object> visited, int? maxDepth, int? maxCollectionItems)
|
||||||
{
|
{
|
||||||
string indentation = new string(' ', indent * 2);
|
string indentation = new string(' ', indent * 2);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace System.Runtime.CompilerServices
|
||||||
|
{
|
||||||
|
internal static class IsExternalInit { }
|
||||||
|
}
|
||||||
|
|
||||||
namespace EonaCat.Logger
|
namespace EonaCat.Logger
|
||||||
{
|
{
|
||||||
// This file is part of the EonaCat project(s) which is released under the Apache License.
|
// This file is part of the EonaCat project(s) which is released under the Apache License.
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public static class LogHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
category ??= "General";
|
category ??= "General";
|
||||||
var sb = new StringBuilderChill(settings?.HeaderFormat);
|
var sb = new StringBuilder(settings?.HeaderFormat);
|
||||||
var timestamp = dateTime.ToString(settings?.TimestampFormat ?? "yyyy-MM-dd HH:mm:ss");
|
var timestamp = dateTime.ToString(settings?.TimestampFormat ?? "yyyy-MM-dd HH:mm:ss");
|
||||||
var timeLabel = settings?.UseLocalTime ?? false ? "[LOCAL]" : "[UTC]";
|
var timeLabel = settings?.UseLocalTime ?? false ? "[LOCAL]" : "[UTC]";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user