mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-21 00:25:54 +02:00
NTFileSystemAdapter: Improved logging
This commit is contained in:
parent
b54cee3070
commit
dc925568a1
1 changed files with 3 additions and 1 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue