Skip to content

Commit

Permalink
Updated the logs
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Aug 16, 2024
1 parent 66f19de commit ce1e5d6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bash/log.sh
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
2 changes: 1 addition & 1 deletion cli/ratchet/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion cli/ratchet/game.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion cli/ratchet/ws_game.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
10 changes: 8 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ce1e5d6

Please sign in to comment.