Skip to content

Commit

Permalink
Replace some non-injected loggers
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 committed Jul 24, 2024
1 parent 4e49626 commit cbd9a55
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import javax.inject.Inject
*/
class LogFileHandler @Inject constructor(
@ApplicationContext val context: Context,
private val logger: Logger,
private val notificationRegistry: NotificationRegistry
): Handler(), Closeable {

Expand Down Expand Up @@ -71,7 +72,6 @@ class LogFileHandler @Inject constructor(
}

private var fileHandler: FileHandler? = null
private val logger = Logger.getGlobal()
private val notificationManager = NotificationManagerCompat.from(context)

private val logFile = getDebugLogFile(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ class AccountRepository @Inject constructor(
private val accountSettingsFactory: AccountSettings.Factory,
@ApplicationContext val context: Context,
private val homeSetRepository: DavHomeSetRepository,
private val logger: Logger,
private val settingsManager: SettingsManager,
private val serviceRepository: DavServiceRepository,
private val collectionRepository: DavCollectionRepository
) {

private val logger = Logger.getGlobal()

private val accountType = context.getString(R.string.account_type)
private val accountManager = AccountManager.get(context)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import java.util.logging.Logger
class AccountSettings @AssistedInject constructor(
@Assisted accountOrAddressBookAccount: Account,
@ApplicationContext val context: Context,
private val logger: Logger,
private val migrationsFactory: AccountSettingsMigrations.Factory,
private val settingsManager: SettingsManager
) {
Expand Down Expand Up @@ -135,8 +136,6 @@ class AccountSettings @AssistedInject constructor(
}


private val logger: Logger = Logger.getGlobal()

val accountManager: AccountManager = AccountManager.get(context)
val account: Account = when (accountOrAddressBookAccount.type) {
context.getString(R.string.account_type_address_book) -> {
Expand Down

0 comments on commit cbd9a55

Please sign in to comment.