From ce1e5d625165629e18a7ac04cc2f10b34e2e31dd Mon Sep 17 00:00:00 2001 From: programarivm Date: Fri, 16 Aug 2024 11:09:18 +0200 Subject: [PATCH] Updated the logs --- bash/log.sh | 2 +- cli/ratchet/data.php | 2 +- cli/ratchet/game.php | 2 +- cli/ratchet/ws_game.php | 2 +- docs/installation.md | 10 ++++++++-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bash/log.sh b/bash/log.sh index bb7ca069..042c0918 100755 --- a/bash/log.sh +++ b/bash/log.sh @@ -1,7 +1,7 @@ #!/bin/bash script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -file_path="${script_dir}/../storage/pchess.log" +file_path="${script_dir}/../storage/game.log" max_size=10485760 file_size=$(stat -c%s "$file_path") diff --git a/cli/ratchet/data.php b/cli/ratchet/data.php index ae6314cd..ab6b7101 100644 --- a/cli/ratchet/data.php +++ b/cli/ratchet/data.php @@ -23,7 +23,7 @@ $dotenv->load(); $logger = new Logger('log'); -$logger->pushHandler(new StreamHandler(__DIR__.'/../../storage' . '/pchess.log', Logger::INFO)); +$logger->pushHandler(new StreamHandler(__DIR__.'/../../storage' . '/data.log', Logger::INFO)); $clientStorage = new RatchetClientStorage($logger); diff --git a/cli/ratchet/game.php b/cli/ratchet/game.php index 2bf361d8..af429814 100644 --- a/cli/ratchet/game.php +++ b/cli/ratchet/game.php @@ -23,7 +23,7 @@ $dotenv->load(); $logger = new Logger('log'); -$logger->pushHandler(new StreamHandler(__DIR__.'/../../storage' . '/pchess.log', Logger::INFO)); +$logger->pushHandler(new StreamHandler(__DIR__.'/../../storage' . '/game.log', Logger::INFO)); $clientStorage = new RatchetClientStorage($logger); diff --git a/cli/ratchet/ws_game.php b/cli/ratchet/ws_game.php index 2541e91f..ddfc93d0 100644 --- a/cli/ratchet/ws_game.php +++ b/cli/ratchet/ws_game.php @@ -20,7 +20,7 @@ $dotenv->load(); $logger = new Logger('log'); -$logger->pushHandler(new StreamHandler(__DIR__.'/../../storage' . '/pchess.log', Logger::INFO)); +$logger->pushHandler(new StreamHandler(__DIR__.'/../../storage' . '/game.log', Logger::INFO)); $clientStorage = new RatchetClientStorage($logger); diff --git a/docs/installation.md b/docs/installation.md index 3f61e892..a9569c53 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -6,10 +6,16 @@ Clone the `chesslablab/chess-server` repo into your projects folder. Then `cd` t cp .env.example .env ``` -Create an empty `pchess.log` file: +Create an empty `data.log` file: ```txt -touch storage/pchess.log +touch storage/data.log +``` + +Create an empty `game.log` file: + +```txt +touch storage/game.log ``` Make sure to have installed the `fullchain.pem` and `privkey.pem` files in the `ssl` folder, and run the Docker container in detached mode in the background: