From 2d48d6326353573d7f496b6452427fba7885c1df Mon Sep 17 00:00:00 2001 From: stratic-dev Date: Sat, 5 Oct 2024 04:36:37 +0100 Subject: [PATCH 1/2] added ./bin to ignore when building dockerfile --- .dockerignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..6dd29b7f8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +bin/ \ No newline at end of file From ae3295167111dbdbafaf45f859e5fc507e657767 Mon Sep 17 00:00:00 2001 From: stratic-dev Date: Sat, 5 Oct 2024 22:56:53 +0100 Subject: [PATCH 2/2] Add troubleshooting for setup on docker and add opcode dec and hex to logger --- docker/README.md | 4 ++++ server/channelserver/sys_session.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index 3f45a12c0..11c018215 100644 --- a/docker/README.md +++ b/docker/README.md @@ -64,3 +64,7 @@ if you want all the logs and you want it to be in an attached state ```bash docker-compose up ``` + + +# Troubleshooting +Q: My Postgres will not populate. A: You're setup.sh is maybe saved as CRLF it needs to be saved as LF. \ No newline at end of file diff --git a/server/channelserver/sys_session.go b/server/channelserver/sys_session.go index ca9f5ff6c..a3abd5622 100644 --- a/server/channelserver/sys_session.go +++ b/server/channelserver/sys_session.go @@ -15,6 +15,7 @@ import ( "erupe-ce/network" "erupe-ce/network/clientctx" "erupe-ce/network/mhfpacket" + "go.uber.org/zap" ) @@ -275,7 +276,7 @@ func (s *Session) logMessage(opcode uint16, data []byte, sender string, recipien } else { fmt.Printf("[%s] -> [%s]\n", sender, recipient) } - fmt.Printf("Opcode: %s\n", opcodePID) + fmt.Printf("Opcode: (Dec: %d Hex: 0x%04X Name: %s) \n", opcode, opcode, opcodePID) if s.server.erupeConfig.DebugOptions.LogMessageData { if len(data) <= s.server.erupeConfig.DebugOptions.MaxHexdumpLength { fmt.Printf("Data [%d bytes]:\n%s\n", len(data), hex.Dump(data))