forked from StarOpenSource/Engine
Rename methods, update default value for methodCaller(depth)
This commit is contained in:
parent
9d001032c2
commit
3b532a2dda
4 changed files with 4 additions and 4 deletions
|
@ -108,7 +108,7 @@ class Logger {
|
|||
fun log(level: Level, message: String, levelData: Map<String, Object?> = emptyMap(), callerDepth: UInt = 0u) {
|
||||
// Create 'Call' instance
|
||||
var call: Call = Call(
|
||||
StackTraceUtils.getMethodCaller(callerDepth.plus(1u)),
|
||||
StackTraceUtils.methodCaller(depth = callerDepth.plus(1u)),
|
||||
level,
|
||||
message,
|
||||
channel
|
||||
|
|
|
@ -303,7 +303,7 @@ class Environment private constructor() {
|
|||
* @return maximum clock speed of logical processors in Hz or `-1` if it couldn't be determined
|
||||
* @since v1-alpha10
|
||||
*/
|
||||
fun getCPUMaxFrequency(): Long? = hw?.processor?.maxFreq
|
||||
fun getCPUMaximumFrequency(): Long? = hw?.processor?.maxFreq
|
||||
|
||||
/**
|
||||
* Returns the estimated current clock
|
||||
|
|
|
@ -339,7 +339,7 @@ open class BuildInformation
|
|||
protected fun getFileContent(file: String): String? {
|
||||
if (loadLocation == null) {
|
||||
// Read from resources
|
||||
val origin: Origin = StackTraceUtils.getMethodCaller(2u)
|
||||
val origin: Origin = StackTraceUtils.methodCaller(depth = 2u)
|
||||
val reader: Reader
|
||||
try {
|
||||
reader = InputStreamReader(
|
||||
|
|
|
@ -42,7 +42,7 @@ class StackTraceUtils private constructor() {
|
|||
* @return deepest method caller
|
||||
* @since v1-alpha10
|
||||
*/
|
||||
fun getMethodCaller(depth: UInt = 0u): Origin {
|
||||
fun methodCaller(depth: UInt = 1u): Origin {
|
||||
val stacktrace: Array<StackTraceElement> = Throwable().stackTrace
|
||||
var element: StackTraceElement? = null
|
||||
|
||||
|
|
Loading…
Reference in a new issue