public Log(FileInfo fileInfo, PriorityLevels filePriority = PriorityLevels.UltraLow, FileWriteModes writeMode = FileWriteModes.Overwrite, PriorityLevels debugPriority = PriorityLevels.UltraLow, PriorityLevels consolePriority = PriorityLevels.UltraLow, OutputFormats output = OutputFormats.File | OutputFormats.Debugger, bool enable = true) { FileInfo = fileInfo; FilePriority = filePriority; FileWriteMode = writeMode; DebuggerPriority = debugPriority; ConsolePriority = consolePriority; Output = output; IsEnabled = enable; WriteToFileCount = 0; Messages = new ConcurrentBag <LogMessage>(); _logCount++; if (_logCount == 1) { LogToFileBackgroundTask(); } }
public Log(PriorityLevels filePriority = PriorityLevels.UltraLow, FileWriteModes writeMode = FileWriteModes.Overwrite, PriorityLevels debugPriority = PriorityLevels.UltraLow, PriorityLevels consolePriority = PriorityLevels.UltraLow, OutputFormats output = OutputFormats.File | OutputFormats.Debugger, bool enable = true) : this(new FileInfo($@"{ AppDomain.CurrentDomain.BaseDirectory }\{ DefaultGlobalLogFilename }"), filePriority, writeMode, debugPriority, consolePriority, output, enable) { }