Git Product home page Git Product logo

log4posh's Introduction

Log4PoSH Module

A PowerShell wrapper module for Apache Log4Net

AppVeyor Build PSG Version PSG Downloads

From the Apache log4net Project Page:

The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent Apache log4j™ framework to the Microsoft® .NET runtime. We have kept the framework similar in spirit to the original log4j while taking advantage of new features in the .NET runtime. For more information on log4net see the features document.

Installation

Install-Module -Name Log4PoSH

Use -AllowPrerelease to install 'devel' versions (expect bugs).

Quick Start

To a File

Import-Module -Name Log4PoSH
Initialize-Logger
$Layout = New-LoggerLayoutPattern -ConversionPattern '[%date{yyyy-MM-dd HH:mm:ss}] [%level] %message%n'
$FileApp = New-LoggerAppenderFile -FileName 'C:\Full\Path\To\my.log' -Layout $Layout
Set-LoggerConfigBasic -Appender $FileApp
$Log = Get-Logger
$Log.Info('This is informative');

To the Console

Import-Module -Name Log4PoSH
Initialize-Logger
$Layout = New-LoggerLayoutPattern -ConversionPattern '[%date{yyyy-MM-dd HH:mm:ss}] [%level] %message%n'
$ConsApp = New-LoggerAppenderConsole -Layout $Layout
Set-LoggerConfigBasic -Appender $ConsApp
$Log = Get-Logger
$Log.Error('No Error');

Multiple Appenders

... As above
Set-LoggerConfigBasic -Appender $FileApp, $ConsApp
$Log = Get-Logger
$Log.Warn('Too Many Logs, said nobody fixing buggy code')

Release History

  • 0.1.x
    • Work in Progress - Keep your expectations low, very low

Documentation

TODO Documentation

Contributing

  1. Fork it (https://github.com/chrisstone/Log4PoSH/fork)
  2. Create a branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request (https://github.com/chrisstone/Log4PoSH/compare)

Branches

  • master - Stable releases, CI pushes to PSGallery
  • devel - Prereleaes, CI pushes to PSGallery, must pass testing
  • feature/* - Feature development, no CI, voluntary testing
  • issue/* - Fixes for reported issues, no CI, voluntary testing

log4posh's People

Contributors

chrisstone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.