In B4J we get a logfile for the requests as : srvr.Initialize("srvr") srvr.Port = 8090 srvr.LogsFileFolder="Gagent.log" srvr.LogsRetainDays=1 However the log filename is always in the format b4j-date.request.log Is there anyway to rename the log file ? Thanks in advance.
mmh, with your suggested solution I get 2 log files now the original one starting with b4j.... and the one I defined in NCSARequestLog.InitializeNewInstance()
the 'b4j......' file will be created with each access to the server, so I have to constantly delete that file.
Is there no other way?
OK, was properly dreaming. The original one is only created after startup ...........
B4X:
Dim LogsFolder As String = srvr.LogsFileFolder
Log("Logfile folder created: "& LogsFolder)
Dim filelist As List
filelist.Initialize
filelist.AddAll(File.ListFiles(LogsFolder))
For Each f As String In filelist
If f.StartsWith("b4j") Then
File.Delete(LogsFolder,f)
End If
Next