mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Unlisted videos are not displayed on Mastodon now
This commit is contained in:
parent
3bf1ec2ebb
commit
276d03ed1a
4 changed files with 19 additions and 23 deletions
|
@ -21,7 +21,7 @@ function keysExcluder (key, value) {
|
|||
return excludedKeys[key] === true ? undefined : value
|
||||
}
|
||||
|
||||
const loggerFormat = winston.format.printf(info => {
|
||||
const consoleLoggerFormat = winston.format.printf(info => {
|
||||
let additionalInfos = JSON.stringify(info, keysExcluder, 2)
|
||||
if (additionalInfos === '{}') additionalInfos = ''
|
||||
else additionalInfos = ' ' + additionalInfos
|
||||
|
@ -30,6 +30,12 @@ const loggerFormat = winston.format.printf(info => {
|
|||
return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}`
|
||||
})
|
||||
|
||||
const jsonLoggerFormat = winston.format.printf(info => {
|
||||
if (info.message && info.message.stack !== undefined) info.message = info.message.stack
|
||||
|
||||
return JSON.stringify(info)
|
||||
})
|
||||
|
||||
const timestampFormatter = winston.format.timestamp({
|
||||
format: 'YYYY-MM-dd HH:mm:ss.SSS'
|
||||
})
|
||||
|
@ -49,18 +55,18 @@ const logger = new winston.createLogger({
|
|||
timestampFormatter,
|
||||
labelFormatter,
|
||||
winston.format.splat(),
|
||||
winston.format.json()
|
||||
jsonLoggerFormat
|
||||
)
|
||||
}),
|
||||
new winston.transports.Console({
|
||||
handleExceptions: true,
|
||||
handleExcegiptions: true,
|
||||
humanReadableUnhandledException: true,
|
||||
format: winston.format.combine(
|
||||
timestampFormatter,
|
||||
winston.format.splat(),
|
||||
labelFormatter,
|
||||
winston.format.colorize(),
|
||||
loggerFormat
|
||||
consoleLoggerFormat
|
||||
)
|
||||
})
|
||||
],
|
||||
|
@ -72,6 +78,6 @@ const logger = new winston.createLogger({
|
|||
export {
|
||||
timestampFormatter,
|
||||
labelFormatter,
|
||||
loggerFormat,
|
||||
consoleLoggerFormat,
|
||||
logger
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue