Skip to content

Instantly share code, notes, and snippets.

Stan barsv

Block or report user

Report or block barsv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
barsv / logger.ps1
Last active Feb 3, 2020
Logging in powershell with log rotation
View logger.ps1
# all logging settins are here on top
$logFile = "log-$(gc env:computername).log"
$logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL")
$logSize = 1mb # 30kb
$logCount = 10
# end of settings
function Write-Log-Line ($line) {
Add-Content $logFile -Value $Line
Write-Host $Line
barsv / BindingTest.cs
Last active May 27, 2019
Binding Proof of concept
View BindingTest.cs
using System;
using System.Linq.Expressions;
using PostSharp.Aspects;
namespace BindingTest
class Program
static void Main()
You can’t perform that action at this time.