Skip to content

Commit

Permalink
Update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
heggert committed Feb 10, 2021
1 parent 36e0181 commit abd218b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
3 changes: 1 addition & 2 deletions services/rds/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rds",
"description": "Raw Data Storage",
"version": "1.0.1",
"version": "1.0.1-dev",
"main": "index.js",
"author": "Basaas GmbH",
"license": "Apache-2.0",
Expand Down Expand Up @@ -31,7 +31,6 @@
"@openintegrationhub/event-bus": "*",
"@openintegrationhub/iam-utils": "*",
"bunyan": "1.8.14",
"bunyan-format": "0.2.1",
"cors": "2.8.5",
"express": "4.17.1",
"mongoose": "5.11.8",
Expand Down
7 changes: 1 addition & 6 deletions services/rds/src/logger.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
const bunyan = require('bunyan')
const bformat = require('bunyan-format')
const pkg = require('../package.json')

const formatOut = bformat({
outputMode: 'long',
})

const log = bunyan.createLogger({
name: pkg.name,
stream: formatOut,
serializers: bunyan.stdSerializers,
level: process.env.LOG_LEVEL,
src: true, // disable in production
})
Expand Down
2 changes: 1 addition & 1 deletion services/rds/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Server {
// wait for index creation
require('./model/raw-record').on('index', (error) => {
if (error) {
console.error('RawRecord index error: %s', err)
logger.error('RawRecord index error', error)
} else {
resolve()
}
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5095,7 +5095,7 @@ builtin-status-codes@^3.0.0:
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=

bunyan-format@0.2.1, bunyan-format@^0.2.1:
bunyan-format@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/bunyan-format/-/bunyan-format-0.2.1.tgz#a4b3b0d80070a865279417269e3f00ff02fbcb47"
integrity sha1-pLOw2ABwqGUnlBcmnj8A/wL7y0c=
Expand Down

0 comments on commit abd218b

Please sign in to comment.