Download MovieTube.Viewer/Classes/LogManager.cs from niobures/VideoSearch: direct link, hf CLI and curl.
- Browser
- Download file 872 Bytes
-
https://huggingface.co/niobures/VideoSearch/resolve/main/MovieTube.Viewer/Classes/LogManager.cs
- Command line
-
hf download hf://niobures/VideoSearch/MovieTube.Viewer/Classes/LogManager.cs
-
curl -L -o LogManager.cs https://huggingface.co/niobures/VideoSearch/resolve/main/MovieTube.Viewer/Classes/LogManager.cs
872 Bytes
| using System; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| using System.IO; | |
| namespace MovieTube.Viewer | |
| { | |
| public static class LogManager | |
| { | |
| private static string ErrorFile = "error.txt"; | |
| private static string LogFile = "log.txt"; | |
| static LogManager() | |
| { | |
| } | |
| public static void Log(string message) | |
| { | |
| if(AppSettings.Log) | |
| File.AppendAllText(LogFile, DateTime.Now.ToString() + ": " + message +Environment.NewLine); | |
| } | |
| public static void LogError(string message, Exception ex) | |
| { | |
| if (AppSettings.Log) | |
| File.AppendAllText(ErrorFile, DateTime.Now.ToString() + ": " + message + ": Exception => " + ex != null ? ex.ToString() : String.Empty + Environment.NewLine); | |
| } | |
| } | |
| } | |