⌘BABAKOV.NET Let's code!
100% [light] [ru]
~/posts $

Posts

Let's code!

202 total · page 4 / 21

Adding Logging to .NET Core Web Application with NLog

Example of adding logging to a .NET Core Web application based on NLog. Initially, add the NLog.Web.AspNetCore package via Nuget. Then add a nlog.config file to the project root with the following content: <?xml version="1.0" encoding="utf-8"?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" autoReload="true"> <targets> <target name="file" xsi:type="FileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} ${uppercase:${level}} ${message}" /> </targets> </nlog>

235 views 0 comments 0 likes ./Read →

Class for Transliteration of Sentences in Russian according to GOST and ISO in C# under .NET Core

Sometimes you have to deal with converting a sentence in Russian to a Russian text but in Latin (translit), for example, when sending SMS to reduce costs - because Latin usually fits more and is cheaper. Or when bringing links to a website in a convenient form without Cyrillic, or simply for sending information to solve problems with coding in this exotic way, there are many options where this may be useful.

314 views 0 comments 0 likes ./Read →