Skip to content

Commit 4b697b5

Browse files
committed
Erros Removed
1 parent f3c021b commit 4b697b5

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/JsonColumnizer/JsonColumnizer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected static JObject ParseJson(ILogLine line)
174174

175175
public class ColumnWithName : Column
176176
{
177-
public string ColumneName { get; set; }
177+
public string ColumnName { get; set; }
178178
}
179179

180180
//
@@ -186,20 +186,20 @@ protected virtual IColumnizedLogLine SplitJsonLine(ILogLine line, JObject json)
186186
{
187187
var cLogLine = new ColumnizedLogLine { LogLine = line };
188188

189-
var columns = json.Properties().Select(property => new ColumnWithName { FullValue = property.Value.ToString(), ColumneName = property.Name.ToString(), Parent = cLogLine }).ToList();
189+
var columns = json.Properties().Select(property => new ColumnWithName { FullValue = property.Value.ToString(), ColumnName = property.Name.ToString(), Parent = cLogLine }).ToList();
190190

191191
foreach (var jsonColumn in columns)
192192
{
193193
// When find new column in a log line, add a new column in the end of the list.
194-
if (!ColumnSet.Contains(jsonColumn.ColumneName))
194+
if (!ColumnSet.Contains(jsonColumn.ColumnName))
195195
{
196196
if (ColumnList.Count == 1 && !ColumnSet.Contains(ColumnList[0].Name))
197197
{
198198
ColumnList.Clear();
199199
}
200200

201-
ColumnSet.Add(jsonColumn.ColumneName);
202-
ColumnList.Add(new JsonColumn(jsonColumn.ColumneName));
201+
ColumnSet.Add(jsonColumn.ColumnName);
202+
ColumnList.Add(new JsonColumn(jsonColumn.ColumnName));
203203
}
204204
}
205205

@@ -210,7 +210,7 @@ protected virtual IColumnizedLogLine SplitJsonLine(ILogLine line, JObject json)
210210
List<IColumn> returnColumns = [];
211211
foreach (var column in ColumnList)
212212
{
213-
var existingColumn = columns.Find(x => x.ColumneName == column.Name);
213+
var existingColumn = columns.Find(x => x.ColumnName == column.Name);
214214
if (existingColumn != null)
215215
{
216216
returnColumns.Add(new Column() { FullValue = existingColumn.FullValue, Parent = cLogLine });

src/JsonCompactColumnizer/JsonCompactColumnizer.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public override Priority GetPriority(string fileName, IEnumerable<ILogLine> samp
5353
if (json != null)
5454
{
5555
var columns = SplitJsonLine(samples.First(), json);
56-
if (columns.ColumnValues.Count() > 0 && Array.Exists(columns.ColumnValues, x => !string.IsNullOrEmpty(x.FullValue)))
56+
if (columns.ColumnValues.Length > 0 && Array.Exists(columns.ColumnValues, x => !string.IsNullOrEmpty(x.FullValue)))
5757
{
5858
result = Priority.PerfectlySupport;
5959
}
@@ -85,10 +85,10 @@ public override Priority GetPriority(string fileName, IEnumerable<ILogLine> samp
8585

8686
protected override IColumnizedLogLine SplitJsonLine(ILogLine line, JObject json)
8787
{
88-
List<IColumn> returnColumns = new();
88+
List<IColumn> returnColumns = [];
8989
var cLogLine = new ColumnizedLogLine { LogLine = line };
9090

91-
var columns = json.Properties().Select(property => new ColumnWithName { FullValue = property.Value.ToString(), ColumneName = property.Name.ToString(), Parent = cLogLine }).ToList();
91+
var columns = json.Properties().Select(property => new ColumnWithName { FullValue = property.Value.ToString(), ColumnName = property.Name.ToString(), Parent = cLogLine }).ToList();
9292

9393
//
9494
// Always rearrage the order of all json fields within a line to follow the sequence of columnNameList.
@@ -98,7 +98,7 @@ protected override IColumnizedLogLine SplitJsonLine(ILogLine line, JObject json)
9898
{
9999
if (column.StartsWith('@'))
100100
{
101-
var existingColumn = columns.Find(x => x.ColumneName == column);
101+
var existingColumn = columns.Find(x => x.ColumnName == column);
102102

103103
if (existingColumn != null)
104104
{
@@ -111,7 +111,7 @@ protected override IColumnizedLogLine SplitJsonLine(ILogLine line, JObject json)
111111
}
112112
}
113113

114-
cLogLine.ColumnValues = returnColumns.ToArray();
114+
cLogLine.ColumnValues = [.. returnColumns];
115115

116116
return cLogLine;
117117
}

src/Log4jXmlColumnizer/Log4jColumnEntry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Log4jXmlColumnizer
44
{
55
/// <summary>
6-
/// Helper class for configuration of the colums.
6+
/// Helper class for configuration of the columns.
77
/// </summary>
88
[Serializable]
99
public class Log4jColumnEntry(string name, int index, int maxLen)

0 commit comments

Comments
 (0)