Skip to content

Commit

Permalink
feat: logging class
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jun 22, 2022
1 parent a4529c3 commit caf2745
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
15 changes: 0 additions & 15 deletions src/main/kotlin/app/revanced/patcher/PatchLogger.kt

This file was deleted.

4 changes: 3 additions & 1 deletion src/main/kotlin/app/revanced/patcher/PatcherOptions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package app.revanced.patcher

import app.revanced.patcher.logging.impl.NopLogger
import app.revanced.patcher.logging.Logger
import java.io.File

/**
Expand All @@ -17,5 +19,5 @@ data class PatcherOptions(
internal val patchResources: Boolean = false,
internal val aaptPath: String = "",
internal val frameworkFolderLocation: String? = null,
internal val logger: PatchLogger = NoopPatchLogger
internal val logger: Logger = NopLogger
)
8 changes: 8 additions & 0 deletions src/main/kotlin/app/revanced/patcher/logging/Logger.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package app.revanced.patcher.logging

interface Logger {
fun error(msg: String) {}
fun warn(msg: String) {}
fun info(msg: String) {}
fun trace(msg: String) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package app.revanced.patcher.logging.impl

import app.revanced.patcher.logging.Logger

object NopLogger : Logger

0 comments on commit caf2745

Please sign in to comment.