Only change the log folder on enterprise build
This commit is contained in:
parent
2d801a0924
commit
2a67ad4c67
2 changed files with 78 additions and 12 deletions
|
|
@ -93,13 +93,16 @@ class DefaultBugReporter @Inject constructor(
|
|||
private var currentLogDirectory: File = baseLogDirectory
|
||||
|
||||
init {
|
||||
val logSubfolder = runBlocking {
|
||||
sessionStore.getLatestSession()
|
||||
}?.userId?.substringAfter(":")
|
||||
setCurrentLogDirectory(logSubfolder)
|
||||
matrixAuthenticationService.listenToNewMatrixClients {
|
||||
// When a new Matrix client is created, we update the tracing configuration to write to files
|
||||
setLogDirectorySubfolder(it.userIdServerName())
|
||||
if (buildMeta.isEnterpriseBuild) {
|
||||
val logSubfolder = runBlocking {
|
||||
sessionStore.getLatestSession()
|
||||
}?.userId?.substringAfter(":")
|
||||
setCurrentLogDirectory(logSubfolder)
|
||||
matrixAuthenticationService.listenToNewMatrixClients {
|
||||
// When a new Matrix client is created, we update the tracing configuration to write
|
||||
// the files in a dedicated subfolders.
|
||||
setLogDirectorySubfolder(it.userIdServerName())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -312,8 +315,10 @@ class DefaultBugReporter @Inject constructor(
|
|||
}
|
||||
|
||||
override fun setLogDirectorySubfolder(subfolderName: String?) {
|
||||
setCurrentLogDirectory(subfolderName)
|
||||
tracingService.updateWriteToFilesConfiguration(createWriteToFilesConfiguration())
|
||||
if (buildMeta.isEnterpriseBuild) {
|
||||
setCurrentLogDirectory(subfolderName)
|
||||
tracingService.updateWriteToFilesConfiguration(createWriteToFilesConfiguration())
|
||||
}
|
||||
}
|
||||
|
||||
private fun setCurrentLogDirectory(subfolderName: String?) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue