protected void LogMessage(string message, string sourcePath = null, string targetPath = null) { string att = FsPath.Exists(sourcePath) ? FsPath.GetAttString(sourcePath) : null; string size = FsPath.Size(sourcePath); log.Debug($"\n{DateTime.Now} [{Thread.CurrentThread.ManagedThreadId,2}] {"User File System Monitor: ",-26}{message,-45} {sourcePath,-80} {size,7} {att} {targetPath}"); }
protected void LogError(string message, string sourcePath, Exception ex) { string att = FsPath.Exists(sourcePath) ? FsPath.GetAttString(sourcePath) : null; log.Error($"\n{DateTime.Now} [{Thread.CurrentThread.ManagedThreadId,2}] {"User File System Monitor: ",-26}{message,-45} {sourcePath,-80} {att} ", ex); }