mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
25 lines
588 B
C#
25 lines
588 B
C#
namespace AssetRipper.Import.Logging;
|
|
|
|
/// <summary>
|
|
/// A file logger that doesn't include log types in the output.
|
|
/// </summary>
|
|
public class CleanFileLogger : FileLoggerBase
|
|
{
|
|
public CleanFileLogger() : base() { }
|
|
|
|
/// <param name="filePath">The absolute path to the log file</param>
|
|
public CleanFileLogger(string filePath) : base(filePath) { }
|
|
|
|
public sealed override void Log(LogType type, LogCategory category, string message)
|
|
{
|
|
try
|
|
{
|
|
File.AppendAllText(filePath, $"{message}{Environment.NewLine}");
|
|
}
|
|
catch (IOException)
|
|
{
|
|
//Could not log to file
|
|
}
|
|
}
|
|
}
|