Skip to content

Commit

Permalink
refactor(node): Move the logger variable to the top
Browse files Browse the repository at this point in the history
Make more clear that all functions could make use of it.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau authored and sschuberth committed Nov 7, 2024
1 parent 9c22891 commit 8478040
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ import org.ossreviewtoolkit.utils.spdx.SpdxConstants

internal const val NON_EXISTING_SEMVER = "0.0.0"

private val logger = loggerOf(MethodHandles.lookup().lookupClass())

/**
* Expand an NPM shortcut [url] to a regular URL as used for dependencies, see
* https://docs.npmjs.com/cli/v7/configuring-npm/package-json#urls-as-dependencies.
Expand Down Expand Up @@ -247,8 +249,6 @@ internal fun parsePackage(
return module
}

private val logger = loggerOf(MethodHandles.lookup().lookupClass())

internal fun parseProject(packageJsonFile: File, analysisRoot: File, managerName: String): Project {
logger.debug { "Parsing project info from '$packageJsonFile'." }

Expand Down

0 comments on commit 8478040

Please sign in to comment.