switch from json to text formatter for logger

This commit is contained in:
Ian Norden 2020-03-17 08:45:01 -05:00
parent e7225317d4
commit 64a33e910a
3 changed files with 6 additions and 5 deletions

View File

@ -5,4 +5,4 @@ RUN npm install -g postgraphile-plugin-connection-filter
RUN npm install -g @graphile/pg-pubsub RUN npm install -g @graphile/pg-pubsub
EXPOSE 5000 EXPOSE 5000
ENTRYPOINT ["postgraphile", "-n", "0.0.0.0"] ENTRYPOINT ["postgraphile"]

View File

@ -78,8 +78,8 @@ services:
"--subscriptions", "--subscriptions",
"--simple-subscriptions", "--simple-subscriptions",
"--connection", $DATABASE_URL, "--connection", $DATABASE_URL,
"--host", "0.0.0.0",
"--port", "5000", "--port", "5000",
"-n", "0.0.0.0"
"--schema", "public,btc,eth" "--schema", "public,btc,eth"
"--append-plugins", "postgraphile-plugin-connection-filter"] "--append-plugins", "postgraphile-plugin-connection-filter"]

View File

@ -1,15 +1,16 @@
package main package main
import ( import (
"github.com/vulcanize/vulcanizedb/cmd"
"os" "os"
"github.com/vulcanize/vulcanizedb/cmd"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )
func main() { func main() {
logrus.SetFormatter(&logrus.JSONFormatter{ logrus.SetFormatter(&logrus.TextFormatter{
PrettyPrint: true, FullTimestamp: true,
}) })
file, err := os.OpenFile("vulcanizedb.log", file, err := os.OpenFile("vulcanizedb.log",
os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)