mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 20:05:02 -04:00
log: remove all deprecated functions
This commit is contained in:
parent
17e2801465
commit
1f010c44a6
@ -26,6 +26,8 @@ import de.bixilon.minosoft.terminal.commands.executors.CommandConnectionExecutor
|
||||
import de.bixilon.minosoft.terminal.commands.executors.CommandExecutor;
|
||||
import de.bixilon.minosoft.util.BitByte;
|
||||
import de.bixilon.minosoft.util.logging.Log;
|
||||
import de.bixilon.minosoft.util.logging.LogLevels;
|
||||
import de.bixilon.minosoft.util.logging.LogMessageType;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ -39,7 +41,7 @@ public class CommandArgumentNode extends CommandLiteralNode {
|
||||
ResourceLocation parserResourceLocation = buffer.readResourceLocation();
|
||||
this.parser = CommandParsers.INSTANCE.getParserInstance(parserResourceLocation);
|
||||
if (this.parser == null) {
|
||||
Log.verbose("Unknown command parser: %s", parserResourceLocation);
|
||||
Log.log(LogMessageType.NETWORK_PACKETS_IN, LogLevels.VERBOSE, () -> "Unknown command parser:" + parserResourceLocation);
|
||||
} else {
|
||||
this.properties = this.parser.readParserProperties(buffer);
|
||||
}
|
||||
|
@ -15,6 +15,8 @@ package de.bixilon.minosoft.util
|
||||
|
||||
import de.bixilon.kutil.unit.UnitFormatter
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
import de.bixilon.minosoft.util.logging.LogLevels
|
||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||
|
||||
class Stopwatch {
|
||||
val id = LAST_ID++
|
||||
@ -37,7 +39,7 @@ class Stopwatch {
|
||||
|
||||
fun labPrint() {
|
||||
val delta = lab()
|
||||
Log.info("Stop watch ($id) lab: ${UnitFormatter.formatNanos(delta)}")
|
||||
Log.log(LogMessageType.GENERAL, LogLevels.INFO) { "Stop watch ($id) lab: ${UnitFormatter.formatNanos(delta)}" }
|
||||
}
|
||||
|
||||
fun totalTime(): String {
|
||||
|
@ -150,15 +150,13 @@ object Log {
|
||||
else -> ChatComponent.of(message, ignoreJson = true)
|
||||
}
|
||||
|
||||
LOG_QUEUE.add(
|
||||
MessageToSend(
|
||||
message = formattedMessage,
|
||||
time = TimeUtil.time,
|
||||
logMessageType = type,
|
||||
level = level,
|
||||
thread = Thread.currentThread(),
|
||||
additionalPrefix = additionalPrefix,
|
||||
)
|
||||
LOG_QUEUE += MessageToSend(
|
||||
message = formattedMessage,
|
||||
time = TimeUtil.time,
|
||||
logMessageType = type,
|
||||
level = level,
|
||||
thread = Thread.currentThread(),
|
||||
additionalPrefix = additionalPrefix,
|
||||
)
|
||||
}
|
||||
|
||||
@ -179,17 +177,4 @@ object Log {
|
||||
fun log(type: LogMessageType, messageBuilder: () -> Any) {
|
||||
log(type, additionalPrefix = null, messageBuilder = messageBuilder)
|
||||
}
|
||||
|
||||
@Deprecated(message = "Java only")
|
||||
@JvmStatic
|
||||
fun info(message: Any, vararg formatting: Any) {
|
||||
log(LogMessageType.OTHER, level = LogLevels.INFO, message = message, formatting = formatting)
|
||||
}
|
||||
|
||||
|
||||
@Deprecated(message = "Java only")
|
||||
@JvmStatic
|
||||
fun verbose(message: Any, vararg formatting: Any) {
|
||||
log(LogMessageType.OTHER, level = LogLevels.VERBOSE, message = message, formatting = formatting)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user