Add a single debug log for troubleshooting
All checks were successful
Build & Test / nix-build (push) Successful in 1m9s
All checks were successful
Build & Test / nix-build (push) Successful in 1m9s
This commit is contained in:
parent
0f59aaef59
commit
6a2701aace
@ -46,6 +46,7 @@ defmodule Amethyst.Server do
|
|||||||
@moduledoc """
|
@moduledoc """
|
||||||
This module includes shared boilerplate code for all stages of the server.
|
This module includes shared boilerplate code for all stages of the server.
|
||||||
"""
|
"""
|
||||||
|
require Logger
|
||||||
|
|
||||||
defmacro __using__(_opts) do
|
defmacro __using__(_opts) do
|
||||||
quote do
|
quote do
|
||||||
@ -63,6 +64,7 @@ defmodule Amethyst.Server do
|
|||||||
Logger.debug("Transmitting #{inspect(packet)}")
|
Logger.debug("Transmitting #{inspect(packet)}")
|
||||||
data = serialize(packet)
|
data = serialize(packet)
|
||||||
length = byte_size(data) |> Amethyst.Minecraft.Write.varint()
|
length = byte_size(data) |> Amethyst.Minecraft.Write.varint()
|
||||||
|
Logger.debug("Sending #{inspect(length <> data)}")
|
||||||
:gen_tcp.send(client, length <> data)
|
:gen_tcp.send(client, length <> data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user