chore: simplifies logs

This commit is contained in:
James
2024-03-07 12:10:06 -05:00
parent 846f59974c
commit c08f981224
3 changed files with 1 additions and 6 deletions

View File

@@ -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)

View File

@@ -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(

View File

@@ -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) {