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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# MEMZone.WriteLog

[![CI](https://github.com/MEM-Zone/MEM.Zone-PSWriteLog/actions/workflows/ci.yml/badge.svg)](https://github.com/MEM-Zone/MEM.Zone-PSWriteLog/actions/workflows/ci.yml)
[![CI](https://github.com/MEM-Zone/MEM.Zone-WriteLog/actions/workflows/ci.yml/badge.svg)](https://github.com/MEM-Zone/MEM.Zone-WriteLog/actions/workflows/ci.yml)
[![PSGallery Version](https://img.shields.io/powershellgallery/v/MEMZone.WriteLog.svg)](https://www.powershellgallery.com/packages/MEMZone.WriteLog)
[![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/MEMZone.WriteLog.svg)](https://www.powershellgallery.com/packages/MEMZone.WriteLog)
[![License](https://img.shields.io/github/license/MEM-Zone/MEM.Zone-PSWriteLog.svg)](LICENSE)
[![License](https://img.shields.io/github/license/MEM-Zone/MEM.Zone-WriteLog.svg)](LICENSE)

Structured PowerShell logging with dual console/file output, rich text formatting, animated progress indicators, and debug-level function tracing.

Expand All @@ -29,8 +29,8 @@ Install-Module -Name MEMZone.WriteLog -Scope CurrentUser
Clone the repository and import the module directly:

```powershell
git clone https://github.com/MEM-Zone/MEM.Zone-PSWriteLog.git
Import-Module ./MEM.Zone-PSWriteLog/src/MEMZone.WriteLog/MEMZone.WriteLog.psd1
git clone https://github.com/MEM-Zone/MEM.Zone-WriteLog.git
Import-Module ./MEM.Zone-WriteLog/src/MEMZone.WriteLog/MEMZone.WriteLog.psd1
```

## Quick Start
Expand All @@ -39,7 +39,7 @@ Import-Module ./MEM.Zone-PSWriteLog/src/MEMZone.WriteLog/MEMZone.WriteLog.psd1
Import-Module MEMZone.WriteLog

# Initialize logging
Initialize-PSWriteLog -LogName 'MyScript' -LogPath 'C:\Logs\MyScript'
Initialize-WriteLog -LogName 'MyScript' -LogPath 'C:\Logs\MyScript'

# Write messages with different formatting
Write-Log -Message 'Operation completed successfully'
Expand Down Expand Up @@ -76,7 +76,7 @@ Write-LogBuffer

| Function | Description |
|---|---|
| `Initialize-PSWriteLog` | Configure logging (path, console output, debug, rotation size) |
| `Initialize-WriteLog` | Configure logging (path, console output, debug, rotation size) |
| `Write-Log` | Write a structured log entry with severity and formatting |
| `Write-LogBuffer` | Flush the in-memory buffer to the log file |
| `Test-LogFile` | Ensure log directory/file exist; rotate if oversized |
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `Initialize-PSWriteLog` - Module initialization with configurable log path, console output, debug logging, and size-based rotation.
- `Initialize-WriteLog` - Module initialization with configurable log path, console output, debug logging, and size-based rotation.
- `Write-Log` - Structured logging with severity levels, dual console/file output, and rich formatting support.
- `Write-LogBuffer` - Buffered log flushing for improved I/O performance.
- `Test-LogFile` - Log directory/file creation and size-based rotation.
Expand Down
10 changes: 5 additions & 5 deletions src/MEMZone.WriteLog/MEMZone.WriteLog.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RootModule = 'MEMZone.WriteLog.psm1'

# Version number of this module (SemVer)
ModuleVersion = '1.0.0'
ModuleVersion = '2.0.0'

# Supported PSEditions
CompatiblePSEditions = @('Desktop', 'Core')
Expand All @@ -28,7 +28,7 @@

# Functions to export from this module
FunctionsToExport = @(
'Initialize-PSWriteLog'
'Initialize-WriteLog'
'Test-LogFile'
'Write-LogBuffer'
'Write-Log'
Expand All @@ -47,10 +47,10 @@
PrivateData = @{
PSData = @{
Tags = @('Logging', 'Log', 'Write-Log', 'Console', 'Formatting', 'Animation', 'Progress', 'Table', 'PSEdition_Desktop', 'PSEdition_Core', 'Windows')
LicenseUri = 'https://github.com/MEM-Zone/MEM.Zone-PSWriteLog/blob/main/LICENSE'
ProjectUri = 'https://github.com/MEM-Zone/MEM.Zone-PSWriteLog'
LicenseUri = 'https://github.com/MEM-Zone/MEM.Zone-WriteLog/blob/main/LICENSE'
ProjectUri = 'https://github.com/MEM-Zone/MEM.Zone-WriteLog'
IconUri = 'https://raw.githubusercontent.com/MEM-Zone/MEM-Zone.github.io/master/media/MEM.Zone-Logo.png'
ReleaseNotes = 'https://github.com/MEM-Zone/MEM.Zone-PSWriteLog/blob/main/docs/CHANGELOG.md'
ReleaseNotes = 'https://github.com/MEM-Zone/MEM.Zone-WriteLog/blob/main/docs/CHANGELOG.md'
}
}
}
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/MEMZone.WriteLog.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
#>

##*=============================================
Expand Down
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/Public/Format-Message.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ function Format-Message {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Utilities
.FUNCTIONALITY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Initialize-PSWriteLog {
function Initialize-WriteLog {
<#
.SYNOPSIS
Initializes the PSWriteLog module state.
Initializes the MEMZone.WriteLog module state.
.DESCRIPTION
Configures logging parameters including log file path, console output preference,
debug message logging, and maximum log file size. Automatically creates the log
Expand All @@ -17,9 +17,9 @@ function Initialize-PSWriteLog {
.PARAMETER LogMaxSizeMB
Maximum log file size in MB before rotation. Default: 5.
.EXAMPLE
Initialize-PSWriteLog -LogName 'MyScript' -LogPath 'C:\Logs\MyScript'
Initialize-WriteLog -LogName 'MyScript' -LogPath 'C:\Logs\MyScript'
.EXAMPLE
Initialize-PSWriteLog -LogName 'MyScript' -LogPath 'C:\Logs\MyScript' -LogToConsole $false -LogDebugMessages $true
Initialize-WriteLog -LogName 'MyScript' -LogPath 'C:\Logs\MyScript' -LogToConsole $false -LogDebugMessages $true
.INPUTS
None
.OUTPUTS
Expand All @@ -29,11 +29,11 @@ function Initialize-PSWriteLog {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Logging
.FUNCTIONALITY
Expand Down
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/Public/Invoke-WithAnimation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ function Invoke-WithAnimation {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Utilities
.FUNCTIONALITY
Expand Down
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/Public/Invoke-WithStatus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ function Invoke-WithStatus {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Utilities
.FUNCTIONALITY
Expand Down
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/Public/Test-LogFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ function Test-LogFile {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Logging
.FUNCTIONALITY
Expand Down
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/Public/Write-FunctionHeaderOrFooter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ function Write-FunctionHeaderOrFooter {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Utilities
.FUNCTIONALITY
Expand Down
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/Public/Write-Log.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ function Write-Log {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Logging
.FUNCTIONALITY
Expand Down
6 changes: 3 additions & 3 deletions src/MEMZone.WriteLog/Public/Write-LogBuffer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ function Write-LogBuffer {
.LINK
https://MEM.Zone
.LINK
https://MEMZ.one/PSWriteLog
https://MEMZ.one/WriteLog
.LINK
https://MEMZ.one/PSWriteLog-GIT
https://MEMZ.one/WriteLog-GIT
.LINK
https://MEMZ.one/PSWriteLog-ISSUES
https://MEMZ.one/WriteLog-ISSUES
.COMPONENT
Script Logging
.FUNCTIONALITY
Expand Down
Loading
Loading