https://github.com/luk4z7/logres
Distributed logs system PostgreSQL to MongoDB, catch all query in your database locally or in production and push your logs for centralized database NoSQL
https://github.com/luk4z7/logres
cli distributed-systems go logging mongodb postgresql
Last synced: about 2 months ago
JSON representation
Distributed logs system PostgreSQL to MongoDB, catch all query in your database locally or in production and push your logs for centralized database NoSQL
- Host: GitHub
- URL: https://github.com/luk4z7/logres
- Owner: luk4z7
- License: bsd-3-clause
- Created: 2017-07-26T11:24:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T04:54:07.000Z (over 7 years ago)
- Last Synced: 2025-01-20T10:48:41.175Z (3 months ago)
- Topics: cli, distributed-systems, go, logging, mongodb, postgresql
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Distributed logs system PostgresSQL to MongoDB
[](https://goreportcard.com/report/github.com/luk4z7/logres)
### Installation
```bash
go get github.com/luk4z7/logres
```### Configuration
configure your postgres for work with logs type csv
```bash
vim /etc/postgresql/9.2/main/postgresql.conf
```like this:
```bash
#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------# - Where to Log -
log_destination = 'csvlog' # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.# This is used when logging to stderr:
logging_collector = on # Enable capturing of stderr and csvlog
# into log files. Required to be on for
# csvlogs.
# (change requires restart)
```if do you like prefer change the directive `log_statement` for log all type of query, errors, warning, etc ...
```bash
log_statement = 'all' # none, ddl, mod, all
```Restart your postgresql
```bash
/etc/init.d/postgresql restart
```Configure your environment
```bash
logres --config
```and then execute the `--run`
```bash
logres --run
```