I am trying to create a logging file(my app is crashing on 1 customers sight), and I
get the error message "java.io.FileNotFoundException: true/newfile.log (No such file or directory)"
when I try to open/write to the file.
Here is my code.
get the error message "java.io.FileNotFoundException: true/newfile.log (No such file or directory)"
when I try to open/write to the file.
Here is my code.
B4X:
Sub LogWrite(EventsLog As String)
If File.ExternalWritable = False Then
Msgbox("Cannot write log file.", "")
Return
Else
Dim TextWriter1 As TextWriter
TextWriter1.Initialize(File.OpenOutput(File.ExternalWritable, "newfile.log", True))
TextWriter1.WriteLine("- " & EventsLog)
TextWriter1.Close
End If
End Sub