using System;
using System.IO;
+using System.Linq;
using System.Runtime.CompilerServices;
using System.ComponentModel;
}
else
{
- Uri f = new Uri("file://" + file);
- Interop.Dlog.Print(priority, tag, "%s: %s(%d) > %s", Path.GetFileName(f.AbsolutePath), func, line, message);
+ string[] fileslice = file.Split(new char[] { '\\', '/' });
+ string filename = fileslice.Last();
+ Interop.Dlog.Print(priority, tag, "%s: %s(%d) > %s", filename, func, line, message);
}
}
}
}
else
{
- Uri f = new Uri("file://" + file);
- Interop.Dlog.InternalPrint(log_id, priority, tag, "%s: %s(%d) > %s", Path.GetFileName(f.AbsolutePath), func, line, message);
+ string[] fileslice = file.Split(new char[] { '\\', '/' });
+ string filename = fileslice.Last();
+ Interop.Dlog.InternalPrint(log_id, priority, tag, "%s: %s(%d) > %s", filename, func, line, message);
}
}
}
}
else
{
- Uri f = new Uri("file://" + file);
- Interop.Dlog.InternalPrint(log_id, priority, tag, "%s: %s(%d) > [SECURE_LOG] %s", Path.GetFileName(f.AbsolutePath), func, line, message);
+ string[] fileslice = file.Split(new char[] { '\\', '/' });
+ string filename = fileslice.Last();
+ Interop.Dlog.InternalPrint(log_id, priority, tag, "%s: %s(%d) > %s", filename, func, line, message);
}
#endif
}