Skip to content

Commit

Permalink
sq
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkChaos committed Aug 27, 2024
1 parent 12607b6 commit 32593e4
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,7 @@ in Excel or OpenOffice Calc) or MySQL/MariaDB database.

You can select one of following query log types:

- `mysql`: log each query in the external MySQL/MariaDB database
`target` format docs: [Data Source Name](https://github.com/go-sql-driver/mysql?tab=readme-ov-file#dsn-data-source-name).
- `mysql`: log each query in the external MySQL/MariaDB database
- `postgresql`: log each query in the external PostgreSQL database
- `timescale`: log each query in the external Timescale database
- `csv`: log into CSV file (one per day)
Expand Down Expand Up @@ -688,7 +687,20 @@ Configuration parameters:
Please ensure, that the log directory is writable or database exists. If you use docker, please ensure, that the directory is properly
mounted (e.g. volume)

example for CSV format with limited logging information
### Database URLs

To connect to a database, you must provide a URL like value for `target`. The exact format and supported parameters depends on the DB type.
Parsing is handled not by Blocky, but third-party libraries, therefore the documentation is external:

- `mysql`: Go MySQL driver [Data Source Name](https://github.com/go-sql-driver/mysql?tab=readme-ov-file#dsn-data-source-name)
Example: ``
- `postgresql`: [pgx.ParseConfig](https://pkg.go.dev/github.com/jackc/pgx/v5/pgconn#ParseConfig)
Example: ``
- `timescale`: Same as `postgresql`

### Examples

CSV format with limited logging information:
!!! example

```yaml
Expand All @@ -702,7 +714,7 @@ example for CSV format with limited logging information
flushInterval: 30s
```

example for Database
MySQL Database:
!!! example

```yaml
Expand Down

0 comments on commit 32593e4

Please sign in to comment.