Um unsere Webseite für Sie optimal zu gestalten und fortlaufend verbessern zu können, verwenden wir Cookies. Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu. Diese Seite zeigt lediglich nicht-personalisierte Werbung an, um der neuen EU-Datenschutzgrundverordnung gerecht zu werden.
Translate
Dienstag, 30. Juni 2020
Sonntag, 28. Juni 2020
Sonntag, 21. Juni 2020
Serienjunkies.io lockt seine Besucher in die Abofalle!
https://tarnkappe.info/serienjunkies-io-lockt-seine-besucher-in-die-abofalle/
Dienstag, 16. Juni 2020
Freitag, 12. Juni 2020
Dienstag, 9. Juni 2020
Json.Net / Newtonsoft.Json debugging with writer to Serilog
A simple trace writer for Newtonsoft.Json serialization / deserialization debugging
and logging to Serilog.
Link: https://gist.github.com/SeppPenner/1968bbd4a47055471a135bdfbc58ac2b
Code:
// <copyright file="SerilogTraceWriter.cs" company="Hämmer Electronics"> |
// Copyright (c) 2020 All rights reserved. |
// </copyright> |
// <summary> |
// A custom trace writer to write serialization information for Newtonsoft.Json to Serilog. |
// </summary> |
// -------------------------------------------------------------------------------------------------------------------- |
|
namespace Data.Serialization |
{ |
using System; |
using System.Diagnostics; |
using System.Diagnostics.CodeAnalysis; |
|
using Newtonsoft.Json.Serialization; |
|
using Serilog; |
|
/// <summary> |
/// A custom trace writer to write serialization information for Newtonsoft.Json to Serilog. |
/// </summary> |
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")] |
public class SerilogTraceWriter : ITraceWriter |
{ |
/// <summary> |
/// The logger. |
/// </summary> |
private static readonly ILogger Logger = Log.ForContext<SerilogTraceWriter>(); |
|
/// <inheritdoc cref="ITraceWriter"/> |
/// <summary> |
/// Gets the <see cref="TraceLevel"/> that will be used to filter the trace messages passed to the writer. |
/// For example a filter level of <see cref="TraceLevel.Info"/> will exclude <see cref="TraceLevel.Verbose"/> messages and include <see cref="TraceLevel.Info"/>, |
/// <see cref="TraceLevel.Warning"/> and <see cref="TraceLevel.Error"/> messages. |
/// </summary> |
/// <value>The <see cref="TraceLevel"/> that will be used to filter the trace messages passed to the writer.</value> |
/// <seealso cref="ITraceWriter"/> |
public TraceLevel LevelFilter => TraceLevel.Verbose; |
|
/// <inheritdoc cref="ITraceWriter"/> |
/// <summary> |
/// Writes the specified trace level, message and optional exception. |
/// </summary> |
/// <param name="level">The <see cref="TraceLevel"/> at which to write this trace.</param> |
/// <param name="message">The trace message.</param> |
/// <param name="ex">The trace exception. This parameter is optional.</param> |
/// <seealso cref="ITraceWriter"/> |
public void Trace(TraceLevel level, string message, Exception ex) |
{ |
// ReSharper disable once SwitchStatementHandlesSomeKnownEnumValuesWithDefault |
switch (level) |
{ |
case TraceLevel.Info: Logger.Information("Message: {message}, Exception: {exception}.", message, ex); |
break; |
case TraceLevel.Warning: Logger.Warning("Message: {message}, Exception: {exception}.", message, ex); |
break; |
case TraceLevel.Verbose: Logger.Verbose("Message: {message}, Exception: {exception}.", message, ex); |
break; |
case TraceLevel.Error: Logger.Error("Message: {message}, Exception: {exception}.", message, ex); |
break; |
case TraceLevel.Off: break; |
} |
} |
} |
// -------------------------------------------------------------------------------------------------------------------- |
Freitag, 5. Juni 2020
We stand against the racism and violence the Black community is subjected to. Black Lives Matter.
We stand against the racism and violence the Black community is subjected to. Black Lives Matter.
Donnerstag, 4. Juni 2020
Sicherheitsupdate: Angreifer könnten Schadcode in Zoom-Meetings schieben
https://www.heise.de/security/meldung/Sicherheitsupdate-Angreifer-koennten-Schadcode-in-Zoom-Meetings-schieben-4774257.html
Dienstag, 2. Juni 2020
Abonnieren
Posts (Atom)