Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/test_dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "Development" ]
pull_request:
branches: [ "Development" ]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: src
- name: Build
run: dotnet build --no-restore
working-directory: src
- name: Test
run: dotnet test --no-build --verbosity normal
working-directory: src
1 change: 1 addition & 0 deletions src/AutoColumnizer/AutoColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<AssemblyTitle>AutoColumnizer</AssemblyTitle>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Solution Items\Key.snk</AssemblyOriginatorKeyFile>
<IsTestProject>false</IsTestProject>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(SolutionDir)..\bin\$(Configuration)\plugins</OutputPath>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/ColumnizerLib/ColumnizerLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<DocumentationFile>$(SolutionDir)..\bin\Docs\ColumnizerLib.xml</DocumentationFile>
<IsTestProject>false</IsTestProject>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(SolutionDir)..\bin\$(Configuration)</OutputPath>
<NoWarn>CS1591;</NoWarn>
Expand Down
1 change: 1 addition & 0 deletions src/CsvColumnizer/CsvColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<OutputType>Library</OutputType>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
Expand Down
1 change: 1 addition & 0 deletions src/DefaultPlugins/DefaultPlugins.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<OutputType>Library</OutputType>
<IsTestProject>false</IsTestProject>
<RootNamespace>LogExpert</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
1 change: 1 addition & 0 deletions src/FlashIconHighlighter/FlashIconHighlighter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<OutputType>Library</OutputType>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
Expand Down
1 change: 1 addition & 0 deletions src/GlassfishColumnizer/GlassfishColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>Library</OutputType>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(SolutionDir)..\bin\$(Configuration)\plugins</OutputPath>
Expand Down
1 change: 1 addition & 0 deletions src/JsonColumnizer/JsonColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<OutputType>Library</OutputType>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
Expand Down
1 change: 1 addition & 0 deletions src/JsonCompactColumnizer/JsonCompactColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<OutputType>Library</OutputType>
<IsTestProject>false</IsTestProject>
<RootNamespace>JsonColumnizer</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
1 change: 1 addition & 0 deletions src/Log4jXmlColumnizer/Log4jXmlColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<OutputType>Library</OutputType>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
Expand Down
42 changes: 21 additions & 21 deletions src/LogExpert/Classes/Log/PositionAwareStreamReaderBase.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System;
using LogExpert.Config;
using LogExpert.Entities;

using System;
using System.IO;
using System.Text;
using LogExpert.Entities;

namespace LogExpert.Classes.Log
{
Expand Down Expand Up @@ -35,7 +37,7 @@ protected PositionAwareStreamReaderBase(Stream stream, EncodingOptions encodingO
_posIncPrecomputed = GetPosIncPrecomputed(usedEncoding);

_reader = new StreamReader(_stream, usedEncoding, true);

Position = 0;
}

Expand All @@ -54,7 +56,7 @@ public sealed override long Position
/*
* 1: Sometime commented (+Encoding.GetPreamble().Length)
* 2: Date 1.1 3207
* 3: Error Message from Piet because of Unicode-Bugs.
* 3: Error Message from Piet because of Unicode-Bugs.
* No Idea, if this is OK.
* 4: 27.07.09: Preamble-Length is now calculated in CT, because Encoding.GetPreamble().Length
* always delivers a fixed length (does not mater what kind of data)
Expand Down Expand Up @@ -128,9 +130,7 @@ protected virtual void ResetReader()

protected StreamReader GetStreamReader()
{
if (IsDisposed) throw new ObjectDisposedException(ToString());

return _reader;
return IsDisposed ? throw new ObjectDisposedException(ToString()) : _reader;
}

protected void MovePosition(int offset)
Expand All @@ -149,11 +149,11 @@ protected void MovePosition(int offset)
private int DetectPreambleLengthAndEncoding(out Encoding detectedEncoding)
{
/*
UTF-8: EF BB BF
UTF-16-Big-Endian-Byteorder: FE FF
UTF-16-Little-Endian-Byteorder: FF FE
UTF-32-Big-Endian-Byteorder: 00 00 FE FF
UTF-32-Little-Endian-Byteorder: FF FE 00 00
UTF-8: EF BB BF
UTF-16-Big-Endian-Byteorder: FE FF
UTF-16-Little-Endian-Byteorder: FF FE
UTF-32-Big-Endian-Byteorder: 00 00 FE FF
UTF-32-Little-Endian-Byteorder: FF FE 00 00
*/

byte[] readPreamble = new byte[4];
Expand Down Expand Up @@ -205,17 +205,17 @@ private int GetPosIncPrecomputed(Encoding usedEncoding)
switch (usedEncoding)
{
case UTF8Encoding _:
{
return 0;
}
{
return 0;
}
case UnicodeEncoding _:
{
return 2;
}
{
return 2;
}
default:
{
return 1;
}
{
return 1;
}
}
}

Expand Down
19 changes: 15 additions & 4 deletions src/LogExpert/Classes/PluginRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void LoadPluginAssembly(string dllName, string interfaceName)

if (instance is IColumnizerConfigurator configurator)
{
configurator.LoadConfig(ConfigManager.Settings.preferences.PortableMode ? ConfigManager.PortableModeDir : ConfigManager.ConfigDir);
configurator.LoadConfig(ConfigManager.Settings.Preferences.PortableMode ? ConfigManager.PortableModeDir : ConfigManager.ConfigDir);
}

if (instance is ILogExpertPlugin plugin)
Expand All @@ -154,9 +154,20 @@ private void LoadPluginAssembly(string dllName, string interfaceName)
}
else
{
if (TryAsContextMenu(type)) continue;
if (TryAsKeywordAction(type)) continue;
if (TryAsFileSystem(type)) continue;
if (TryAsContextMenu(type))
{
continue;
}

if (TryAsKeywordAction(type))
{
continue;
}

if (TryAsFileSystem(type))
{
continue;
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/LogExpert/Config/Preferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public class Preferences

public bool ShowErrorMessageAllowOnlyOneInstances { get; set; }

public int MaxLineLength { get; set; } = 20000;

#endregion
}
}
53 changes: 47 additions & 6 deletions src/LogExpert/Dialogs/SettingsDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/LogExpert/Dialogs/SettingsDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ private void FillDialog()
radioButtonSessionApplicationStartupDir.Checked = true;
}

upDownMaximumLineLength.Value = Preferences.MaxLineLength;

upDownMaximumFilterEntriesDisplayed.Value = Preferences.maximumFilterEntriesDisplayed;
upDownMaximumFilterEntries.Value = Preferences.maximumFilterEntries;

Expand Down
Loading
Loading