Skip to content

Michael-Free/FreeLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreeLog Powershell Module

A cross-platform PowerShell file-based logging module that has multiple severity-levels.

Overview

FreeLog is a lightweight, cross-platform PowerShell logging module that provides simple yet powerful logging capabilities for your scripts and modules. With four severity levels, automatic log file management, and pipeline integration, FreeLog makes it easy to implement professional logging in any PowerShell project.

Key Features:

  • Simple Setup - Initialize with one command, start logging immediately
  • Four Severity Levels - LOG, WARN, ERROR, and FAIL for clear log organization
  • Automatic File Management - Creates log files and directories automatically

Installation

From PowerShell Gallery

Install-Module -Name FreeLog -Scope CurrentUser

Import the module

Import-Module FreeLog

Key Functions

New-LogFile

Creates and initializes a new global log file instance.

New-LogFile -Path "C:\Logs\application.log"

Write-LogFile

Writes messages to the active log file using different severity levels.

Write-LogFile -TaskMessage "Application started"
Write-LogFile -TaskWarn "High memory usage detected"
Write-LogFile -TaskError "Failed to connect to database"
Write-LogFile -TaskFail "Critical system failure"

Requirements

  • PowerShell 5.1 or higher
  • Operating Systems:
    • Windows Desktop or Windows Server OS
    • MacOS with Powershell installed
    • Any Linux distribution that is supported by Powershell
  • Administrative or Local Privileges to install Powershell Modules

Module Information

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the terms included in the LICENSE file.

This is using the Free Custom License (FCL v1.0)

Disclaimer

This module is provided as-is with no warranty.

About

A simple cross-platform logging module for powershell

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors