Skip to content

Commit

Permalink
Updating documentation and changing version so dotnet pack doesn't tr…
Browse files Browse the repository at this point in the history
…uncate.
  • Loading branch information
jeffpatton1971 committed Aug 5, 2024
1 parent 44af43a commit ebc2098
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,24 @@ All changes to this module should be reflected in this document.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [[1.0.1]](https://github.com/mod-posh/Logger/releases/tag/v1.0.1) - 2024-08-05

This is just a small update, some documentation fixes and a version change as nuget.org only supports semver version numbers so was truncating anything past the patch version.

## [[1.0.0.0]](https://github.com/mod-posh/Logger/releases/tag/v1.0.0.0) - 2024-01-05

This should be a usable logger in both C# and PowerShell, which I've struggled with lately. It should be simple and allow logging to a file or the console if needed.

## DOCUMENTATION

* Add Documentation #5

## ENHANCEMENT

* Update Psake for use with C# Projects #6
* Add Documentation #5
* Create Factory #4
* Add Testing Framework #3
* Add the ability to handle log rotation #2
* Add the ability to use a configuration file #1
4 changes: 2 additions & 2 deletions Logger/Logger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.0.0.0</Version>
<Version>1.0.1</Version>
<Authors>Jeffrey S. Patton</Authors>
<Company>Patton-Tech.com</Company>
<Description>A Logging library for .Net and PowerShell</Description>
Expand All @@ -16,7 +16,7 @@
<PackageProjectUrl>https://github.com/mod-posh/Logger</PackageProjectUrl>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReleaseNotes>Version 1.0.0.0 of Logger This should be a usable logger in both Cand PowerShell, which I've struggled with lately. It should be simple and allow logging to a file or the console if needed. -DOCUMENTATION - Add Documentation #5 -ENHANCEMENT - Update Psake for use with CProjects #6 - Add Documentation #5 - Create Factory #4 - Add Testing Framework #3 - Add the ability to handle log rotation #2 - Add the ability to use a configuration file #1 </PackageReleaseNotes>
<PackageReleaseNotes>Version 1.0.1 of Logger This should be a usable logger in both Cand PowerShell, which I've struggled with lately. It should be simple and allow logging to a file or the console if needed. -DOCUMENTATION - Add Documentation #5 -ENHANCEMENT - Update Psake for use with CProjects #6 - Add Documentation #5 - Create Factory #4 - Add Testing Framework #3 - Add the ability to handle log rotation #2 - Add the ability to use a configuration file #1 </PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<None Include="..\README.md">
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
| Latest Version | Nuget.org | Issues | License | Discord |
|-----------------|----------------|----------------|----------------|----------------|
| [![Latest Version](https://img.shields.io/github/v/tag/mod-posh/Logger)](https://github.com/mod-posh/Logger/tags) | [![Nuget.org](https://img.shields.io/nuget/dt/ModPosh.Logger)](https://www.nuget.org/packages/ModPosh.Logger) | [![GitHub issues](https://img.shields.io/github/issues/mod-posh/Logger)](https://github.com/mod-posh/Logger/issues) | [![GitHub license](https://img.shields.io/github/license/mod-posh/Logger)](https://github.com/mod-posh/Logger/blob/master/LICENSE) | [![Discord Server](https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0b5493894cf60b300587_full_logo_white_RGB.svg)](https://discord.com/channels/1044305359021555793/1044305781627035811) |

# ModPosh.Logger

`ModPosh.Logger` is a versatile logging library for C# projects and PowerShell scripts/modules. It provides functionality for logging messages to the console or a file, supporting custom configuration and log rotation.

## Code Documentation

Detailed documentation can be found in the [docs](docs/index.md) folder.
Detailed documentation can be found in the [docs](docs\index.md) folder.

## Features

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#### [Logger](index.md 'index')

### [ModPosh.Logger.Factory](ModPosh.Logger.Factory.md 'ModPosh.Logger.Factory').[LoggerFactory](ModPosh.Logger.Factory.LoggerFactory.md 'ModPosh.Logger.Factory.LoggerFactory')

## LoggerFactory.CreateFileLogger(string) Method
Expand All @@ -8,15 +9,20 @@ Creates a Logger instance that logs messages to a specified file.
```csharp
public static ModPosh.Logger.Implementations.Logger CreateFileLogger(string Path);
```

#### Parameters

<a name='ModPosh.Logger.Factory.LoggerFactory.CreateFileLogger(string).Path'></a>

`Path` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

The file path where log messages will be written.

#### Returns
[Logger](ModPosh.Logger.Implementations.Logger.md 'ModPosh.Logger.Implementations.Logger')

[Logger](ModPosh.Logger.Implementations.Logger.md 'ModPosh.Logger.Implementations.Logger')
An instance of Logger configured to log messages to the specified file.

### Remarks
This method creates a Logger instance that writes log messages to the file located at the provided path.

This method creates a Logger instance that writes log messages to the file located at the provided path.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#### [Logger](index.md 'index')

### [ModPosh.Logger.Implementations](ModPosh.Logger.Implementations.md 'ModPosh.Logger.Implementations').[Logger](ModPosh.Logger.Implementations.Logger.md 'ModPosh.Logger.Implementations.Logger')

## Logger(IConfigurationReader, string) Constructor

Initializes a new instance of the Logger class using an IConfigurationReader and a path to the configuration file.
Initializes a new instance of the Logger class using an IConfigurationReader and a path to the configuration file.
This constructor allows for flexible configuration of the logger by reading settings from the specified configuration file.

```csharp
public Logger(ModPosh.Logger.Interfaces.IConfigurationReader configReader, string Path);
```

#### Parameters

<a name='ModPosh.Logger.Implementations.Logger.Logger(ModPosh.Logger.Interfaces.IConfigurationReader,string).configReader'></a>
Expand All @@ -19,4 +21,6 @@ The IConfigurationReader to read the Logger configuration.

<a name='ModPosh.Logger.Implementations.Logger.Logger(ModPosh.Logger.Interfaces.IConfigurationReader,string).Path'></a>

`Path` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
`Path` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

The path to the configuration file that contains settings for the logger.

0 comments on commit ebc2098

Please sign in to comment.