Re: Unicode in path for log file
Given no response here I went digging myself...
This comes down to Win32FileHelper using CreateFile rather than CreateFileW.
Changing the import to
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr CreateFileW(
[MarshalAs(UnmanagedType.LPWStr)] string lpwFileName,
FileAccess dwDesiredAccess,
int dwShareMode,
IntPtr lpSecurityAttributes,
CreationDisposition dwCreationDisposition,
Win32FileAttributes dwFlagsAndAttributes,
IntPtr hTemplateFile);
and then changing BaseFileAppender to call this instead seemed to work ok.
|