Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(log): adjust log message #12

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/database",
"version": "1.0.7",
"version": "1.0.8",
"description": "The Athenna database handler for SQL/NoSQL. Built on top of TypeORM.",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
Expand Down
8 changes: 2 additions & 6 deletions src/Factories/DriverFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class DriverFactory {
client = await ConnectionFactory[driverName](conName)

this.getLogger().success(
`Successfully connected to database using ${conName} connection and ${driverName} driver`,
`Successfully connected to ${conName} database connection`,
)

const dataSource = client
Expand Down Expand Up @@ -160,10 +160,6 @@ export class DriverFactory {
driverObject.clientConnection = null

this.#drivers.set(driverName, driverObject)

this.getLogger().success(
`Successfully closed connection with database for ${driverName} driver`,
)
} catch (error) {
throw new CloseConnectionFailedException(driverName, error)
}
Expand Down Expand Up @@ -252,6 +248,6 @@ export class DriverFactory {
debug: (_message, _options = {}) => {},
success: (_message, _options = {}) => {},
}
: new Logger()
: new Logger().channel('console')
}
}