3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-25 15:50:19 +01:00

Merge pull request #33 from kashike/log

minor shuffle to log messages
Dieser Commit ist enthalten in:
Andrew Steinborn 2018-08-12 04:47:53 -04:00 committet von GitHub
Commit 69430c7c1f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
4 geänderte Dateien mit 13 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -40,18 +40,18 @@ public class Natives {
public static final NativeCodeLoader<VelocityCompressorFactory> compressor = new NativeCodeLoader<>( public static final NativeCodeLoader<VelocityCompressorFactory> compressor = new NativeCodeLoader<>(
ImmutableList.of( ImmutableList.of(
new NativeCodeLoader.Variant<>(NativeCodeLoader.MACOS, new NativeCodeLoader.Variant<>(NativeCodeLoader.MACOS,
copyAndLoadNative("/macosx/velocity-compress.dylib"), "native compression (macOS)", copyAndLoadNative("/macosx/velocity-compress.dylib"), "native (macOS)",
NativeVelocityCompressor.FACTORY), NativeVelocityCompressor.FACTORY),
new NativeCodeLoader.Variant<>(NativeCodeLoader.LINUX, new NativeCodeLoader.Variant<>(NativeCodeLoader.LINUX,
copyAndLoadNative("/linux_x64/velocity-compress.so"), "native compression (Linux amd64)", copyAndLoadNative("/linux_x64/velocity-compress.so"), "native (Linux amd64)",
NativeVelocityCompressor.FACTORY), NativeVelocityCompressor.FACTORY),
new NativeCodeLoader.Variant<>(NativeCodeLoader.ALWAYS, () -> {}, "Java compression", JavaVelocityCompressor.FACTORY) new NativeCodeLoader.Variant<>(NativeCodeLoader.ALWAYS, () -> {}, "Java", JavaVelocityCompressor.FACTORY)
) )
); );
public static final NativeCodeLoader<VelocityCipherFactory> cipher = new NativeCodeLoader<>( public static final NativeCodeLoader<VelocityCipherFactory> cipher = new NativeCodeLoader<>(
ImmutableList.of( ImmutableList.of(
new NativeCodeLoader.Variant<>(NativeCodeLoader.ALWAYS, () -> {}, "Java cipher", JavaVelocityCipher.FACTORY) new NativeCodeLoader.Variant<>(NativeCodeLoader.ALWAYS, () -> {}, "Java", JavaVelocityCipher.FACTORY)
) )
); );
} }

Datei anzeigen

@ -1,6 +1,7 @@
package com.velocitypowered.network; package com.velocitypowered.network;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.velocitypowered.natives.util.Natives;
import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftConnection;
import com.velocitypowered.proxy.connection.client.HandshakeSessionHandler; import com.velocitypowered.proxy.connection.client.HandshakeSessionHandler;
import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.ProtocolConstants;
@ -68,7 +69,7 @@ public final class ConnectionManager {
} }
private void logChannelInformation() { private void logChannelInformation() {
logger.info("Using channel type {}", transportType); logger.info("Connections will use {} channels, {} compression, {} ciphers", transportType, Natives.compressor.getLoadedVariant(), Natives.cipher.getLoadedVariant());
} }
public void bind(final InetSocketAddress address) { public void bind(final InetSocketAddress address) {
@ -168,7 +169,7 @@ public final class ConnectionManager {
KQUEUE(KQueueServerSocketChannel.class, KQueueSocketChannel.class, KQueueDatagramChannel.class) { KQUEUE(KQueueServerSocketChannel.class, KQueueSocketChannel.class, KQueueDatagramChannel.class) {
@Override @Override
public EventLoopGroup createEventLoopGroup(boolean boss) { public EventLoopGroup createEventLoopGroup(boolean boss) {
String name = "Netty Kqueue " + (boss ? "Boss" : "Worker") + " #%d"; String name = "Netty KQueue " + (boss ? "Boss" : "Worker") + " #%d";
return new KQueueEventLoopGroup(0, createThreadFactory(name)); return new KQueueEventLoopGroup(0, createThreadFactory(name));
} }
}; };

Datei anzeigen

@ -1,8 +1,12 @@
package com.velocitypowered.proxy; package com.velocitypowered.proxy;
import com.velocitypowered.proxy.console.VelocityConsole; import com.velocitypowered.proxy.console.VelocityConsole;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class Velocity { public class Velocity {
private static final Logger logger = LogManager.getLogger(Velocity.class);
static { static {
// We use BufferedImage for favicons, and on macOS this puts the Java application in the dock. How inconvenient. // We use BufferedImage for favicons, and on macOS this puts the Java application in the dock. How inconvenient.
// Force AWT to work with its head chopped off. // Force AWT to work with its head chopped off.
@ -10,6 +14,8 @@ public class Velocity {
} }
public static void main(String... args) { public static void main(String... args) {
logger.info("Booting up Velocity...");
final VelocityServer server = VelocityServer.getServer(); final VelocityServer server = VelocityServer.getServer();
server.start(); server.start();

Datei anzeigen

@ -97,11 +97,6 @@ public class VelocityServer implements ProxyServer {
} }
public void start() { public void start() {
logger.info("Using {}", Natives.compressor.getLoadedVariant());
logger.info("Using {}", Natives.cipher.getLoadedVariant());
// Create a key pair
logger.info("Booting up Velocity...");
try { try {
Path configPath = Paths.get("velocity.toml"); Path configPath = Paths.get("velocity.toml");
try { try {