ArLogger 1.0.4
ArLogger
Dotnet projelerinde logları konsola yazdıran ve istenildiğinde dosyaya kaydeden paket
Projeye Ekleme
Windows : %appdata%\NuGet\NuGet.Config Lİnux Veya Mac : ~/.nuget/NuGet/NuGet.Config
...
<packageSources>
...
<add key="localnuget.roboliza.com" value="http://172.16.33.42:5011/v3/index.json" protocolVersion="3" allowInsecureConnections="true" />
<add key="nuget.roboliza.com" value="https://nuget.roboliza.com/v3/index.json" protocolVersion="3" allowInsecureConnections="true" />
</packageSources>
Dockerfile Dosyasına Ekleme
RUN dotnet nuget add source http://172.16.33.42:5011/v3/index.json
RUN dotnet nuget add source https://nuget.roboliza.com/v3/index.json
Kullanım
Logger ayarlama
Logger.InitLogger(new LoggerSettingsModel()
{
ApplicationName = "RobolizaWebApi", // Uygulama adı
ApplicationColor = ConsoleColor.Yellow, // Konsolda görünecek log rengi
ShowConsoleLog = true, // Konsola yazdırma durumu
IsWriteFile = true, // Dosyaya yazdırma durumu
WriteFilePath = "/home/robotik/logs" // Log dosyalarının kaydedileceği konum
});
Log yazdırma
Logger.Info("Program çalıştı");
Logger.Warning("Program durdurldu");
Logger.Error("Bir hata oluştu");
.NET 6.0
- No dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.4 | 568 | 01/13/2025 |