Overwrite log files

This commit is contained in:
Henrik Hüttemann 2023-09-14 16:52:35 +02:00
parent 9c9dd97f33
commit a276d8f8a2
No known key found for this signature in database
GPG Key ID: 9F7BD10E0A8A111E
2 changed files with 5 additions and 1 deletions

View File

@ -83,7 +83,9 @@ async function removeExcessRoomMembers() {
) )
const memberMapping = await getMappingByMatrixId(actualMember) const memberMapping = await getMappingByMatrixId(actualMember)
if (!memberMapping || !memberMapping.accessToken) { if (!memberMapping || !memberMapping.accessToken) {
throw new Error(`Could not find access token for member ${actualMember}, this is a bug`) throw new Error(
`Could not find access token for member ${actualMember}, this is a bug`
)
} }
await axios.post( await axios.post(

View File

@ -8,10 +8,12 @@ export default winston.createLogger({
filename: 'warn.log', filename: 'warn.log',
level: 'warn', level: 'warn',
silent: process.env.NODE_ENV === 'test', silent: process.env.NODE_ENV === 'test',
options: { flags: 'w' },
}), }),
new winston.transports.File({ new winston.transports.File({
filename: 'combined.log', filename: 'combined.log',
silent: process.env.NODE_ENV === 'test', silent: process.env.NODE_ENV === 'test',
options: { flags: 'w' },
}), }),
], ],
format: winston.format.combine( format: winston.format.combine(