aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-02-05 10:52:16 +0100
committerEugen Wissner <belka@caraus.de>2025-02-05 10:52:16 +0100
commit897fb7ece0b10736524991a7421f6fce20e9225a (patch)
treed0a1f6722e2474eec324c64b2e0b6902712ee49e /README.md
parente9bf0d84b8bc456e958eda5b52a0e9218fab6163 (diff)
downloadkazbek-897fb7ece0b10736524991a7421f6fce20e9225a.tar.gz
Add read_logs.rb scripts
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2e256cb..e5b8459 100644
--- a/README.md
+++ b/README.md
@@ -25,4 +25,29 @@ and in another session:
curl localhost:8082
```
+## read\_logs.rb
+
+read\_logs.rb looks in the `log/` directory for files ending with `.log`,
+`.log.1`, `.log.2.gz`, `.log.3.gz` and so forth. It filters out lines starting
+with a timestamp, `yyyy-mm-ddThh:mm:ss`, followed by random characters and a
+custom string provided as the only command line parameter. Finally
+it outputs all matched content after the provided string along with the date.
+
+The log files are read in the order based on the number in the filename.
+
+For example calling the script as
+
+```sh
+./bin/read_logs.rb 'doctrine.INFO:'
+```
+
+on a log file containing
+`[2025-02-04T19:51:49.356093+01:00] doctrine.INFO: Disconnecting [] []`
+
+will print:
+
+```
+2025-02-04 (Disconnecting [])
+```
+
## tea-cleaner