NTFileSystemAdapter: Improved logging

This commit is contained in:
Tal Aloni 2017-02-18 17:56:57 +02:00
parent b54cee3070
commit dc925568a1

View file

@ -283,6 +283,7 @@ namespace SMBLibrary
FileHandle fileHandle = (FileHandle)handle; FileHandle fileHandle = (FileHandle)handle;
if (fileHandle.Stream != null) if (fileHandle.Stream != null)
{ {
Log(Severity.Debug, "CloseFile: Closing '{0}'.", fileHandle.Path);
fileHandle.Stream.Close(); fileHandle.Stream.Close();
} }
@ -290,6 +291,7 @@ namespace SMBLibrary
{ {
try try
{ {
Log(Severity.Debug, "CloseFile: Deleting '{0}'.", fileHandle.Path);
m_fileSystem.Delete(fileHandle.Path); m_fileSystem.Delete(fileHandle.Path);
} }
catch catch
@ -382,7 +384,7 @@ namespace SMBLibrary
EventHandler<LogEntry> handler = OnLogEntry; EventHandler<LogEntry> handler = OnLogEntry;
if (handler != null) if (handler != null)
{ {
handler(this, new LogEntry(DateTime.Now, severity, "NT FileSystem", message)); handler(this, new LogEntry(DateTime.Now, severity, "NT FileSystem Adapter", message));
} }
} }