mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -04:00
hide delegate log messages
This commit is contained in:
parent
3fa1d16ebc
commit
7d8930548e
@ -97,9 +97,9 @@ object Minosoft {
|
||||
})
|
||||
|
||||
taskWorker += Task(identifier = StartupTasks.FILE_WATCHER, priority = ThreadPool.HIGH, optional = true, executor = {
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Starting file watcher service..." }
|
||||
Log.log(LogMessageType.GENERAL, LogLevels.VERBOSE) { "Starting file watcher service..." }
|
||||
FileWatcherService.start()
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.INFO) { "File watcher service started!" }
|
||||
Log.log(LogMessageType.GENERAL, LogLevels.INFO) { "File watcher service started!" }
|
||||
})
|
||||
|
||||
|
||||
|
@ -19,4 +19,6 @@ object StaticConfiguration {
|
||||
const val DEBUG_SLOW_LOADING = false // if true, many Thread.sleep will be executed and the start will be delayed (by a lot)
|
||||
const val SHOW_LOG_MESSAGES_IN_CHAT = false // prints all console messages in the chat box
|
||||
const val REPLACE_SYSTEM_OUT_STREAMS = true // Replace System.out and System.err with the custom Log system ones
|
||||
|
||||
const val LOG_DELEGATE = false
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.bixilon.minosoft.config.profile.delegate.delegate
|
||||
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.config.profile.ProfileManager
|
||||
import de.bixilon.minosoft.config.profile.delegate.ProfilesDelegateManager
|
||||
import de.bixilon.minosoft.config.profile.profiles.Profile
|
||||
@ -36,7 +37,9 @@ abstract class BackingDelegate<V>(
|
||||
return set(value)
|
||||
}
|
||||
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed option $property in profile $profileName from ${get()} to $value" }
|
||||
if (StaticConfiguration.LOG_DELEGATE) {
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed option $property in profile $profileName from ${get()} to $value" }
|
||||
}
|
||||
if (!profile.reloading) {
|
||||
profileManager.profiles[profileName]?.saved = false
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.bixilon.minosoft.config.profile.delegate.delegate.entry
|
||||
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.config.profile.ProfileManager
|
||||
import de.bixilon.minosoft.config.profile.delegate.ProfilesDelegateManager
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
@ -29,8 +30,9 @@ open class ListDelegateProfile<V>(
|
||||
if (!this.profileInitialized || profile.initializing) {
|
||||
return@ListChangeListener
|
||||
}
|
||||
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed list entry $it in profile $profileName" }
|
||||
if (StaticConfiguration.LOG_DELEGATE) {
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed list entry $it in profile $profileName" }
|
||||
}
|
||||
profileManager.profiles[profileName]?.saved = false
|
||||
|
||||
ProfilesDelegateManager.onChange(profile, property.javaField ?: return@ListChangeListener, null, it)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.bixilon.minosoft.config.profile.delegate.delegate.entry
|
||||
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.config.profile.ProfileManager
|
||||
import de.bixilon.minosoft.config.profile.delegate.ProfilesDelegateManager
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
@ -33,7 +34,9 @@ open class MapDelegateProfile<K, V>(
|
||||
}
|
||||
|
||||
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed map entry $it in profile $profileName" }
|
||||
if (StaticConfiguration.LOG_DELEGATE) {
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed map entry $it in profile $profileName" }
|
||||
}
|
||||
profileManager.profiles[profileName]?.saved = false
|
||||
|
||||
ProfilesDelegateManager.onChange(profile, property.javaField ?: return@MapChangeListener, null, it)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.bixilon.minosoft.config.profile.delegate.delegate.entry
|
||||
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.config.profile.ProfileManager
|
||||
import de.bixilon.minosoft.config.profile.delegate.ProfilesDelegateManager
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
@ -30,7 +31,9 @@ open class SetDelegateProfile<V>(
|
||||
return@SetChangeListener
|
||||
}
|
||||
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed set entry $it in profile $profileName" }
|
||||
if (StaticConfiguration.LOG_DELEGATE) {
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed set entry $it in profile $profileName" }
|
||||
}
|
||||
profileManager.profiles[profileName]?.saved = false
|
||||
|
||||
ProfilesDelegateManager.onChange(profile, property.javaField ?: return@SetChangeListener, null, it)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.bixilon.minosoft.util.delegate.delegate.entry
|
||||
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.util.delegate.DelegateManager
|
||||
import de.bixilon.minosoft.util.delegate.DelegateManager.identifier
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
@ -22,7 +23,9 @@ open class ListDelegate<V>(
|
||||
value.addListener(ListChangeListener {
|
||||
verify?.invoke(it)
|
||||
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed list entry $it" }
|
||||
if (StaticConfiguration.LOG_DELEGATE) {
|
||||
Log.log(LogMessageType.OTHER, LogLevels.VERBOSE) { "Changed list entry $it" }
|
||||
}
|
||||
DelegateManager.onChange(thisRef, property.identifier, null, it)
|
||||
})
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.bixilon.minosoft.util.delegate.delegate.entry
|
||||
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.util.delegate.DelegateManager
|
||||
import de.bixilon.minosoft.util.delegate.DelegateManager.identifier
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
@ -22,8 +23,9 @@ open class MapDelegate<K, V>(
|
||||
private fun initListener() {
|
||||
value.addListener(MapChangeListener {
|
||||
verify?.invoke(it)
|
||||
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed map entry $it" }
|
||||
if (StaticConfiguration.LOG_DELEGATE) {
|
||||
Log.log(LogMessageType.OTHER, LogLevels.VERBOSE) { "Changed map entry $it" }
|
||||
}
|
||||
DelegateManager.onChange(thisRef, property.identifier, null, it)
|
||||
})
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.bixilon.minosoft.util.delegate.delegate.entry
|
||||
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.util.delegate.DelegateManager
|
||||
import de.bixilon.minosoft.util.delegate.DelegateManager.identifier
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
@ -22,7 +23,9 @@ open class SetDelegate<V>(
|
||||
value.addListener(SetChangeListener {
|
||||
verify?.invoke(it)
|
||||
|
||||
Log.log(LogMessageType.PROFILES, LogLevels.VERBOSE) { "Changed set entry $it" }
|
||||
if (StaticConfiguration.LOG_DELEGATE) {
|
||||
Log.log(LogMessageType.OTHER, LogLevels.VERBOSE) { "Changed set entry $it" }
|
||||
}
|
||||
DelegateManager.onChange(thisRef, property.identifier, null, it)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user