Skip to content

Connection setting now support log level #148

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion lib/src/single_connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class ConnectionSettings {
bool useSSL;
int maxPacketSize;
int characterSet;
///Default log level is [Level.INFO]. We can set log level as per convenience of the app
Level level;

/// The timeout for connecting to the database and for all database operations.
Duration timeout;
Expand All @@ -52,7 +54,12 @@ class ConnectionSettings {
this.useSSL = false,
this.maxPacketSize = 16 * 1024 * 1024,
this.timeout = const Duration(seconds: 30),
this.characterSet = CharacterSet.UTF8MB4});


this.level = Level.INFO,
this.characterSet = CharacterSet.UTF8MB4}) {
Logger.root.level = level; // defaults to Level.INFO
}

factory ConnectionSettings.socket(
{required String path,
Expand Down Expand Up @@ -85,6 +92,7 @@ class ConnectionSettings {
useSSL = o.useSSL,
maxPacketSize = o.maxPacketSize,
timeout = o.timeout,
level = o.level,
characterSet = o.characterSet;
}

Expand Down