const plugins: VideoJSPluginOptions = {
peertube: {
mode,
- autoplay, // Use peertube plugin autoplay because we get the file by webtorrent
+ autoplay, // Use peertube plugin autoplay because we could get the file by webtorrent
videoViewUrl: commonOptions.videoViewUrl,
videoDuration: commonOptions.videoDuration,
userWatching: commonOptions.userWatching,
import { CONFIG } from '../server/initializers/config'
import { mtimeSortFilesDesc } from '../shared/core-utils/logs/logs'
import { inspect } from 'util'
+import { format as sqlFormat } from 'sql-formatter'
program
.option('-l, --level [level]', 'Level log (debug/info/warn/error)')
message: true,
splat: true,
timestamp: true,
- label: true
+ label: true,
+ sql: true
}
function keysExcluder (key, value) {
return excludedKeys[key] === true ? undefined : value
if (additionalInfos === '{}') additionalInfos = ''
else additionalInfos = ' ' + additionalInfos
+ if (info.sql) {
+ if (CONFIG.LOG.PRETTIFY_SQL) {
+ additionalInfos += '\n' + sqlFormat(info.sql, {
+ language: 'sql',
+ ident: ' '
+ })
+ } else {
+ additionalInfos += ' - ' + info.sql
+ }
+ }
+
return `[${info.label}] ${toTimeFormat(info.timestamp)} ${info.level}: ${info.message}${additionalInfos}`
})