chore: sync logger for prompts, adjust nodemon

This commit is contained in:
Elliot DeNolf
2023-10-03 12:34:48 -04:00
parent 7349c82e28
commit cf26155995
10 changed files with 68 additions and 19 deletions

View File

@@ -5,12 +5,22 @@ import path from 'path'
import { v4 as uuid } from 'uuid'
import payload from '../packages/payload/src'
import { prettySyncLoggerDestination } from '../packages/payload/src/utilities/logger'
import { startLivePreviewDemo } from './live-preview/startLivePreviewDemo'
dotenv.config()
const [testSuiteDir] = process.argv.slice(2)
/**
* The default logger's options did not allow for forcing sync logging
* Using these options, to force both pretty print and sync logging
*/
const prettySyncLogger = {
loggerDestination: prettySyncLoggerDestination,
loggerOptions: {},
}
if (!testSuiteDir) {
console.error('ERROR: You must provide an argument for "testSuiteDir"')
process.exit(1)
@@ -47,6 +57,7 @@ const startDev = async () => {
fromName: 'Payload',
fromAddress: 'hello@payloadcms.com',
},
...prettySyncLogger,
onInit: async (payload) => {
payload.logger.info('Payload Dev Server Initialized')
},