mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
typeorm logging
This commit is contained in:
parent
b43740967f
commit
b94e59882d
@ -18,6 +18,7 @@ const database = {
|
||||
DB_USER: process.env.DB_USER || 'root',
|
||||
DB_PASSWORD: process.env.DB_PASSWORD || '',
|
||||
DB_DATABASE: process.env.DB_DATABASE || 'gradido_community',
|
||||
TYPEORM_LOGGING_RELATIVE_PATH: process.env.TYPEORM_LOGGING_RELATIVE_PATH || '../deployment/bare_metal/log/typeorm.backend.log'
|
||||
}
|
||||
|
||||
const klicktipp = {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { createConnection, Connection } from 'typeorm'
|
||||
import { createConnection, Connection, FileLogger } from 'typeorm'
|
||||
import CONFIG from '../config'
|
||||
import { entities } from '@entity/index'
|
||||
|
||||
@ -15,6 +15,10 @@ const connection = async (): Promise<Connection | null> => {
|
||||
database: CONFIG.DB_DATABASE,
|
||||
entities,
|
||||
synchronize: false,
|
||||
logging: true,
|
||||
logger: new FileLogger("all", {
|
||||
logPath: CONFIG.TYPEORM_LOGGING_RELATIVE_PATH
|
||||
}),
|
||||
})
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user