Unify logs
This commit is contained in:
parent
ef0888fcad
commit
2411b59709
|
@ -11,7 +11,6 @@ import * as correlation from "../correlation"
|
||||||
import { LOG_CONTEXT } from "../index"
|
import { LOG_CONTEXT } from "../index"
|
||||||
|
|
||||||
import { budibaseTempDir } from "../../objectStore"
|
import { budibaseTempDir } from "../../objectStore"
|
||||||
import environment from "../../environment"
|
|
||||||
import pinoPretty from "pino-pretty"
|
import pinoPretty from "pino-pretty"
|
||||||
|
|
||||||
// LOGGER
|
// LOGGER
|
||||||
|
@ -72,14 +71,9 @@ if (!env.DISABLE_PINO_LOGGER) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function localFileDestination() {
|
function localFileDestination() {
|
||||||
const fileName = path.join(
|
const fileName = path.join(budibaseTempDir(), "logs", `budibase.logs`)
|
||||||
budibaseTempDir(),
|
|
||||||
"logs",
|
|
||||||
`${environment.SERVICE_NAME}.logs`
|
|
||||||
)
|
|
||||||
const outFile = rfs.createStream(fileName, {
|
const outFile = rfs.createStream(fileName, {
|
||||||
size: "10M",
|
size: "10M",
|
||||||
|
|
||||||
teeToStdout: true,
|
teeToStdout: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue