Skip to content

Commit

Permalink
Merge pull request #5 from GuySartorelli/20241024_GuySartorelli_addon…
Browse files Browse the repository at this point in the history
…get-readme

docs: update `ddev get` to `ddev add-on get` in readme
  • Loading branch information
apotek authored Nov 16, 2024
2 parents 575641d + a6e7bbe commit 470ec0c
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,49 @@ Database query logging will slow down your application, so this command is inten
## Getting started
Get and install your db log command

ddev get chromatichq/ddev-dblog
For DDEV v1.23.5 or above run

```sh
ddev add-on get chromatichq/ddev-dblog
```

For earlier versions of DDEV run

```sh
ddev get chromatichq/ddev-dblog
```

## Using dblog

### Following (Tailing) queries

To follow the logs live (tail), do

ddev dblog tail
```sh
ddev dblog tail
```

which will tail the log file right in your current terminal window. `ctrl+c` to quit. When you quit tailing, the db query log is turned off automatically.

### Turn on db query logging
If you just want to turn on the logging so you can capture a bunch of output and examine it later, do

ddev dblog on
```sh
ddev dblog on
```

You can find the logs in your db service at /tmp/dblog. Use

ddev ssh -s db
less /tmp/dblog
```sh
ddev ssh -s db
less /tmp/dblog
```

to page through it or search it.

### Turn off db query logging
Remember to turn off the db query logging. The logging is a drain on your application performance.

ddev dblog off



```sh
ddev dblog off
```

0 comments on commit 470ec0c

Please sign in to comment.