chore: simplifies logs
This commit is contained in:
@@ -23,7 +23,6 @@ export const connect: Connect = async function connect(
|
||||
}
|
||||
|
||||
const urlToConnect = this.url
|
||||
const successfulConnectionMessage = 'Connected to MongoDB server successfully!'
|
||||
|
||||
const connectionOptions: ConnectOptions & { useFacet: undefined } = {
|
||||
autoIndex: true,
|
||||
@@ -49,8 +48,6 @@ export const connect: Connect = async function connect(
|
||||
await mongoose.connection.dropDatabase()
|
||||
this.payload.logger.info('---- DROPPED DATABASE ----')
|
||||
}
|
||||
|
||||
this.payload.logger.info(successfulConnectionMessage)
|
||||
}
|
||||
} catch (err) {
|
||||
this.payload.logger.error(`Error: cannot connect to MongoDB. Details: ${err.message}`, err)
|
||||
|
||||
@@ -93,7 +93,7 @@ export const connect: Connect = async function connect(
|
||||
)
|
||||
return
|
||||
|
||||
const { pushSchema } = require('drizzle-kit/payload')
|
||||
const { pushSchema } = await import('drizzle-kit/payload')
|
||||
|
||||
// This will prompt if clarifications are needed for Drizzle to push new schema
|
||||
const { apply, hasDataLoss, statementsToExecute, warnings } = await pushSchema(
|
||||
|
||||
@@ -334,8 +334,6 @@ export class BasePayload<TGeneratedTypes extends GeneratedTypes> {
|
||||
await this.db.connect()
|
||||
}
|
||||
|
||||
this.logger.info('Starting Payload...')
|
||||
|
||||
// Configure email service
|
||||
const emailOptions = options.email ? { ...options.email } : this.config.email
|
||||
if (options.email && this.config.email) {
|
||||
|
||||
Reference in New Issue
Block a user