You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this error when running FileSink on iOS device (simulator works fine):
Caught exception while emitting to sink Serilog.Sinks.File.RollingFileSink: System.UnauthorizedAccessException: Access to the path '/private/var/containers/Bundle/Application/ADEC88A7-24D1-4BB1-B680-55CAC821ECA7/App.iOS.app/file:/var/mobile/Containers/Data/Application/831F4448-5AA3-45F7-92A7-DEF85132C3BC/Documents/Logs' is denied. ---> System.IO.IOException: Operation not permitted
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00192] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs:319
at System.IO.Directory.CreateDirectory (System.String path) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.IO.FileSystem/src/System/IO/Directory.cs:40
at Serilog.Sinks.File.FileSink..ctor (System.String path, Serilog.Formatting.ITextFormatter textFormatter, System.Nullable1[T] fileSizeLimitBytes, System.Text.Encoding encoding, System.Boolean buffered, Serilog.Sinks.File.FileLifecycleHooks hooks) [0x00088] in C:\projects\serilog-sinks-file\src\Serilog.Sinks.File\Sinks\File\FileSink.cs:72 at Serilog.Sinks.File.RollingFileSink.OpenFile (System.DateTime now, System.Nullable1[T] minSequence) [0x00133] in C:\projects\serilog-sinks-file\src\Serilog.Sinks.File\Sinks\File\RollingFileSink.cs:149
at Serilog.Sinks.File.RollingFileSink.AlignCurrentFileTo (System.DateTime now, System.Boolean nextSequence) [0x0000d] in C:\projects\serilog-sinks-file\src\Serilog.Sinks.File\Sinks\File\RollingFileSink.cs:92
at Serilog.Sinks.File.RollingFileSink.Emit (Serilog.Events.LogEvent logEvent) [0x00038] in C:\projects\serilog-sinks-file\src\Serilog.Sinks.File\Sinks\File\RollingFileSink.cs:79
at Serilog.Core.Sinks.SafeAggregateSink.Emit (Serilog.Events.LogEvent logEvent) [0x0000f] in :0
This happens because of Path.GetFullPath method call in the PathRoller.
Expected and valid path: file:/var/mobile/Containers/Data/Application/831F4448-5AA3-45F7-92A7-DEF85132C3BC/Documents/Logs
Actual path: /private/var/containers/Bundle/Application/ADEC88A7-24D1-4BB1-B680-55CAC821ECA7/App.iOS.app/file:/var/mobile/Containers/Data/Application/831F4448-5AA3-45F7-92A7-DEF85132C3BC/Documents/Logs
The text was updated successfully, but these errors were encountered:
Is it possible to let users provide the full path themselves? This should fix the problem and also allow the provided path to be used to get logs without hidden manipulation. What do you think?
I have this error when running FileSink on iOS device (simulator works fine):
This happens because of
Path.GetFullPath
method call in the PathRoller.Expected and valid path:
file:/var/mobile/Containers/Data/Application/831F4448-5AA3-45F7-92A7-DEF85132C3BC/Documents/Logs
Actual path:
/private/var/containers/Bundle/Application/ADEC88A7-24D1-4BB1-B680-55CAC821ECA7/App.iOS.app/file:/var/mobile/Containers/Data/Application/831F4448-5AA3-45F7-92A7-DEF85132C3BC/Documents/Logs
The text was updated successfully, but these errors were encountered: