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 UnhandledExceptionLogger | |
{ | |
public static void Install() | |
{ | |
var log = Log.ForContext(typeof(UnhandledExceptionLogger)); | |
AppDomain.CurrentDomain.UnhandledException += (s, e) => | |
{ | |
log.Fatal(e.ExceptionObject as Exception, "Unhandled exception caught at AppDomain boundary (terminating: {IsTerminating})", e.IsTerminating); | |
}; |
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
var busControl = Bus.Factory.CreateUsingRabbitMq(cfg => { | |
cfg.UseLog4Net(); | |
cfg.UseApplicationInsights(_telemetryClient); | |
cfg.PrefetchCount = (ushort)_settings.MessageBusPrefetchCount; // 10 in our config | |
host = cfg.Host("rabbitcluster", config.VHost, h => { | |
h.UseCluster(c => prioritisedHostNames.ForEach(c.Node)); | |
h.Username(_shardConfigProvider.Username); | |
h.Password(_shardConfigProvider.Password); | |
h.PublisherConfirmation = _publisherConfirms; |
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 interface IResult | |
{ | |
bool WasSuccessful { get; } | |
string[] Errors { get; } | |
bool WasFailure { get; } | |
} | |
public class Result : IResult | |
{ |
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 class ExceptionFingerprintEnricher : ILogEventEnricher | |
{ | |
private const string ThumbprintKey = "ExceptionThumbprint"; | |
private const string TypeKey = "ExceptionType"; | |
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) | |
{ | |
if (logEvent.Exception == null) return; | |
var fingerprint = ExceptionFingerPrinter.GetFingerprint(logEvent.Exception); |
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
function Start-Rider([string] $sln) { | |
& "C:\Users\george.kinsman\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\JetBrains Toolbox\Rider.lnk" $sln | |
} | |
Set-Alias -Name rider -Value Start-Rider |
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
{ | |
"a": { | |
"b": { | |
"c": { | |
"d": 43 | |
} | |
} | |
}, | |
"f": "hello" | |
} |
OlderNewer