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
59 changes: 35 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# LogExpert [![.NET](https://github.com/LogExperts/LogExpert/actions/workflows/build_dotnet.yml/badge.svg)](https://github.com/LogExperts/LogExpert/actions/workflows/build_dotnet.yml)

This is a clone from (no longer exists) https://logexpert.codeplex.com/
This is a clone from (no longer exists) <https://logexpert.codeplex.com/>

## Overview

# Overview
LogExpert is a Windows tail program (a GUI replacement for the Unix tail command).

Summary of (most) features:
Expand All @@ -23,51 +24,61 @@ Summary of (most) features:
* Serilog.Formatting.Compact format support (Experimental)
* Portable (all options / settings saved in application startup directory)

# Download
## Download

Follow the [Link](https://github.com/LogExperts/LogExpert/releases/latest) and download the latest package. Just extract it where you want and execute the application or download the Setup and install it

Or Install via chocolatey

```choco install logexpert```

Requirements
- https://dotnet.microsoft.com/en-us/download/dotnet/8.0
- .NET 8 (https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.13-windows-x64-installer or https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.13-windows-x86-installer)

* <https://dotnet.microsoft.com/en-us/download/dotnet/8.0>
* .NET 8 (<https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.13-windows-x64-installer> or <https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.13-windows-x86-installer>)

## CI

This is a continous integration build. So always the latest and greates changes. It should be stable but no promises. Can be viewed as Beta.

[CI Download](https://ci.appveyor.com/project/Zarunbal/logexpert)

# How to Build
## How to Build

- Clone / Fork / Download the source code
- Open the Solution (src/LogExpert.sln) with Visual Studio 2017 (e.g. Community Edition)
- Restore Nuget Packages on Solution
- Build
- The output is under bin/(Debug/Release)/
* Clone / Fork / Download the source code
* Open the Solution (src/LogExpert.sln) with Visual Studio 2017 (e.g. Community Edition)
* Restore Nuget Packages on Solution
* Build
* The output is under bin/(Debug/Release)/

Nuke.build Requirements
- Chocolatey must be installed
- Optional for Setup Inno Script 5 or 6

# Pull Request
- Use Development branch as target
* Chocolatey must be installed
* Optional for Setup Inno Script 5 or 6

## Pull Request

* Use Development branch as target

## FAQ / HELP / Informations / Examples

# FAQ / HELP / Informations / Examples
Please checkout the wiki for FAQ / HELP / Informations / Examples

# High DPI
- dont use AutoScaleMode for single GUI controls like Buttons etc.
- dont use AutoScaleDimensions for single GUI controls like Buttons etc.
## High DPI

* dont use AutoScaleMode for single GUI controls like Buttons etc.

* dont use AutoScaleDimensions for single GUI controls like Buttons etc.

<https://github.com/LogExperts/LogExpert/wiki>

## Discord Server

https://github.com/LogExperts/LogExpert/wiki
<https://discord.gg/SjxkuckRe9>

# Discord Server
https://discord.gg/SjxkuckRe9
### Credits

## Credits
### Contributors
#### Contributors

This project exists thanks to all the people who contribute.
<a href="https://github.com/LogExperts/LogExpert/graphs/contributors">
Expand Down
135 changes: 113 additions & 22 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ dotnet_sort_system_directives_first = true
file_header_template = unset

# this. and Me. preferences
dotnet_style_qualification_for_event = false
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_property = false
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_property = false:suggestion

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion

# Expression-level preferences
dotnet_prefer_system_hash_code = true
Expand Down Expand Up @@ -89,22 +89,22 @@ dotnet_style_allow_statement_immediately_after_block_experimental = false:warnin
#### C# Coding Conventions ####

# var preferences
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = false:suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion

# Expression-bodied members
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_constructors = false:warning
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = true:suggestion
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_prefer_extended_property_pattern = true:warning
csharp_style_prefer_not_pattern = true:warning
Expand All @@ -120,7 +120,7 @@ csharp_prefer_static_anonymous_function = true
csharp_prefer_static_local_function = true:warning
csharp_style_prefer_readonly_struct = true
csharp_style_prefer_readonly_struct_member = true
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion

# Code-block preferences
csharp_prefer_braces = true:warning
Expand All @@ -132,11 +132,11 @@ csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_prefer_top_level_statements = true:silent

# Expression-level preferences
csharp_prefer_simple_default_expression = true:warning
csharp_prefer_simple_default_expression = false:suggestion
csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
csharp_style_inlined_variable_declaration = true:warning
csharp_style_prefer_local_over_anonymous_function = true:warning
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:warning
csharp_style_prefer_null_check_over_type_check = true:warning
csharp_style_prefer_range_operator = true:warning
Expand All @@ -163,7 +163,7 @@ csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true

Expand Down Expand Up @@ -201,11 +201,61 @@ csharp_space_between_square_brackets = false

# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false
csharp_preserve_single_line_statements = true

#### Naming styles ####

# Naming rules
dotnet_naming_rule.constants_rule.import_to_resharper = as_predefined
dotnet_naming_rule.constants_rule.severity = warning
dotnet_naming_rule.constants_rule.style = all_upper_style
dotnet_naming_rule.constants_rule.symbols = constants_symbols

dotnet_naming_rule.local_functions_rule.import_to_resharper = as_predefined
dotnet_naming_rule.local_functions_rule.severity = warning
dotnet_naming_rule.local_functions_rule.style = lower_camel_case_style
dotnet_naming_rule.local_functions_rule.symbols = local_functions_symbols

dotnet_naming_rule.private_constants_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_constants_rule.severity = warning
dotnet_naming_rule.private_constants_rule.style = all_upper_style
dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols

dotnet_naming_rule.private_static_readonly_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_static_readonly_rule.severity = warning
dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style_1
dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols

dotnet_naming_rule.type_parameters_rule.import_to_resharper = as_predefined
dotnet_naming_rule.type_parameters_rule.severity = warning
dotnet_naming_rule.type_parameters_rule.style = upper_camel_case_style
dotnet_naming_rule.type_parameters_rule.symbols = type_parameters_symbols

dotnet_naming_style.all_upper_style.capitalization = all_upper
dotnet_naming_style.all_upper_style.word_separator = _

dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
dotnet_naming_style.lower_camel_case_style_1.capitalization = camel_case
dotnet_naming_style.lower_camel_case_style_1.required_prefix = _
dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case

dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.constants_symbols.applicable_kinds = field
dotnet_naming_symbols.constants_symbols.required_modifiers = const

dotnet_naming_symbols.local_functions_symbols.applicable_accessibilities = *
dotnet_naming_symbols.local_functions_symbols.applicable_kinds = local_function

dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const

dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly

dotnet_naming_symbols.type_parameters_symbols.applicable_accessibilities = *
dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter

dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
Expand Down Expand Up @@ -269,6 +319,47 @@ dotnet_diagnostic.CS0649.severity = none
dotnet_diagnostic.CS0169.severity = none
dotnet_diagnostic.CS1591.severity = none

# ReSharper properties
resharper_braces_for_for = required
resharper_braces_for_foreach = required
resharper_braces_for_ifelse = required
resharper_braces_for_while = required
resharper_csharp_align_multiline_parameter = true
resharper_csharp_insert_final_newline = true
resharper_csharp_max_line_length = 500
resharper_csharp_use_indent_from_vs = false
resharper_csharp_wrap_lines = false
resharper_indent_nested_fixed_stmt = true
resharper_indent_nested_foreach_stmt = true
resharper_indent_nested_for_stmt = true
resharper_indent_nested_lock_stmt = true
resharper_indent_nested_usings_stmt = true
resharper_indent_nested_while_stmt = true
resharper_indent_preprocessor_if = outdent
resharper_keep_existing_declaration_block_arrangement = false
resharper_keep_existing_embedded_block_arrangement = false
resharper_keep_existing_enum_arrangement = false
resharper_place_accessorholder_attribute_on_same_line = false
resharper_show_autodetect_configure_formatting_tip = false
resharper_space_within_single_line_array_initializer_braces = false
resharper_use_heuristics_for_body_style = true

# ReSharper inspection severities
resharper_arrange_constructor_or_destructor_body_highlighting = none
resharper_arrange_method_or_operator_body_highlighting = none
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_redundant_base_qualifier_highlighting = warning
resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
resharper_use_object_or_collection_initializer_highlighting = hint


#### Analyzers Rules ####

## Microsoft.CodeAnalysis.CSharp.CodeStyle
Expand All @@ -295,7 +386,7 @@ dotnet_diagnostic.IDE0005.severity = none
dotnet_diagnostic.IDE0007.severity = warning

# IDE0008: Use explicit type instead of 'var'
dotnet_diagnostic.IDE0008.severity = warning
dotnet_diagnostic.IDE0008.severity = none

# IDE0009: Add this or Me qualification
dotnet_diagnostic.IDE0009.severity = warning
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace LogExpert.Core.Classes.Persister;
namespace LogExpert.Core.Classes.Attributes;

/// <summary>
/// Marks a property for inclusion in columnizer JSON serialization.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class JsonColumnizerPropertyAttribute : Attribute
public sealed class JsonColumnizerPropertyAttribute : Attribute
{
}

2 changes: 1 addition & 1 deletion src/LogExpert.Core/Classes/Filter/FilterParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Drawing;
using System.Text.RegularExpressions;

using LogExpert.Core.Classes.Persister;
using LogExpert.Core.Classes.JsonConverters;

using Newtonsoft.Json;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System.Reflection;

using LogExpert.Core.Classes.Attributes;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace LogExpert.Core.Classes.Persister;
namespace LogExpert.Core.Classes.JsonConverters;

/// <summary>
/// Custom JsonConverter for ILogLineColumnizer implementations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using Newtonsoft.Json;

namespace LogExpert.Core.Classes.Persister;
namespace LogExpert.Core.Classes.JsonConverters;

/// <summary>
/// Custom JsonConverter for Encoding objects.
Expand All @@ -15,9 +15,16 @@ public override bool CanConvert (Type objectType)
return typeof(Encoding).IsAssignableFrom(objectType);
}

/// <summary>
/// Serializes the Encoding object to its name.
/// </summary>
/// <param name="writer"></param>
/// <param name="value"></param>
/// <param name="serializer"></param>
public override void WriteJson (JsonWriter writer, object? value, JsonSerializer serializer)
{
ArgumentNullException.ThrowIfNull(writer);

if (value is not Encoding encoding)
{
writer.WriteNull();
Expand All @@ -27,9 +34,19 @@ public override void WriteJson (JsonWriter writer, object? value, JsonSerializer
writer.WriteValue(encoding.WebName);
}

/// <summary>
/// Reads a JSON value and converts it to an <see cref="Encoding"/> object.
/// </summary>
/// <param name="reader">The <see cref="JsonReader"/> to read from. Cannot be <see langword="null"/>.</param>
/// <param name="objectType">The type of the object to deserialize. This parameter is not used in this method.</param>
/// <param name="existingValue">The existing value of the object being deserialized. This parameter is not used in this method.</param>
/// <param name="serializer">The calling serializer. This parameter is not used in this method.</param>
/// <returns>An <see cref="Encoding"/> object corresponding to the JSON value. Returns <see cref="Encoding.Default"/> if the
/// JSON value is <see langword="null"/>, empty, or an invalid encoding name.</returns>
public override object? ReadJson (JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
{
ArgumentNullException.ThrowIfNull(reader);

if (reader.TokenType == JsonToken.Null)
{
return null;
Expand Down
Loading
Loading