This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-location -Path C:\ | |
$Shell = $Host.UI.RawUI | |
$size = $Shell.WindowSize | |
$size.width=150 | |
$size.height=50 | |
$Shell.WindowSize = $size | |
$size.Width=150 | |
$size.Height=3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class LogQueueHelper | |
{ | |
public const string exampleXml = | |
@"<?xml version=""1.0"" encoding=""utf-8""?> | |
<events version=""1.2"" xmlns=""http://logging.apache.org/log4net/schemas/log4net-events-1.2""> | |
<event domain=""MessageDomain"" level=""INFO"" logger=""Logger"" thread=""AMQP Connection amqp-0-9://localhost:5672"" timestamp=""2014-05-08T13:16:02.6990183+01:00"" username=""rsgoheen""> | |
<message>LogMessage</message> | |
<properties> | |
<data name=""log4net:Identity"" value=""""/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -Path "Serilog.dll" | |
Add-Type -Path "Serilog.Sinks.Seq.dll" | |
Add-Type -Path "Serilog.Sinks.EventLog.dll" | |
Add-Type -Path "Serilog.FullNetFx.dll" | |
Add-Type -Path "Serilog.Extras.AppSettings.dll" | |
Add-Type -Path "Serilog.Extras.Timing.dll" | |
$Config = New-Object Serilog.LoggerConfiguration | |
[Serilog.Configuration.LoggerSinkConfiguration]$ConfigSink = $config.WriteTo | |
[Serilog.Log]::Logger = [Serilog.LoggerConfigurationFullNetFxExtensions]::RollingFile($ConfigSink, "C:\Logs\Log-{Date}.txt", ([Serilog.Events.LogEventLevel]::Verbose), "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception}", $null, 10000000, 15).CreateLogger() |