https://github.com/conneroisu/dblogger
Zerolog and std-lib Log Writer for Sqlite Databases
https://github.com/conneroisu/dblogger
Last synced: 3 months ago
JSON representation
Zerolog and std-lib Log Writer for Sqlite Databases
- Host: GitHub
- URL: https://github.com/conneroisu/dblogger
- Owner: conneroisu
- License: mit
- Created: 2024-05-15T23:05:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-24T02:29:19.000Z (about 1 year ago)
- Last Synced: 2025-01-21T05:42:23.749Z (4 months ago)
- Language: Go
- Homepage:
- Size: 168 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dblogger
[](https://github.com/conneroisu/dblogger/actions/workflows/test.yaml) [](https://github.com/conneroisu/dblogger/actions/workflows/ci.yaml) [](https://www.phorm.ai/query?projectId=9347e7bb-c03d-4386-a25e-2703dc4d8f10)
A std-lib [log](https://pkg.go.dev/log) and [zerolog](https://pkg.go.dev/github.com/rs/zerolog) logger for Sqlite, Turso, RqLite, and other sqlite-like dialected databases.
## Installation
```bash
go get github.com/conneroisu/dblogger
```## Usage
## Development
### SQL
Each sql file
```sql
-- file: {file_name}
-- url: github.com/conneroisu/dblogger/data/{file_path}.sql
-- description: {description}
```### Makefile
```bash
make dev.requirements
make database
make lint
make test
```### Testing
```bash
make test
```### Linting
```bash
make lint
```### Database
Combine all the sql files (shcemas, queries, seeds) into a single sql file each. (ex: [`data/combined/schema.sql`](https://github.com/conneroisu/dblogger/blob/main/data/combined/schema.sql))
```bash
make database
```