@@ -82,11 +82,11 @@ public static void FirebirdDatabase(this SupportedDatabasesForEnsureDatabase sup
82
82
if ( ! File . Exists ( builder . Database ) )
83
83
{
84
84
FbConnection . CreateDatabase ( builder . ToString ( ) ) ;
85
- logger . WriteInformation ( "Created database {0}" , builder . Database ) ;
85
+ logger . LogInformation ( "Created database {0}" , builder . Database ) ;
86
86
}
87
87
else
88
88
{
89
- logger . WriteInformation ( "Database {0} already exists" , builder . Database ) ;
89
+ logger . LogInformation ( "Database {0} already exists" , builder . Database ) ;
90
90
}
91
91
}
92
92
else
@@ -96,26 +96,26 @@ public static void FirebirdDatabase(this SupportedDatabasesForEnsureDatabase sup
96
96
{
97
97
conn . Open ( ) ;
98
98
conn . Close ( ) ;
99
- logger . WriteInformation ( "Database {0} already exists" , builder . Database ) ;
99
+ logger . LogInformation ( "Database {0} already exists" , builder . Database ) ;
100
100
}
101
101
catch ( FbException ex ) when ( ex . ErrorCode == FbIoError )
102
102
{
103
103
FbConnection . CreateDatabase ( builder . ToString ( ) ) ;
104
- logger . WriteInformation ( "Created database {0}" , builder . Database ) ;
104
+ logger . LogInformation ( "Created database {0}" , builder . Database ) ;
105
105
}
106
106
catch ( FbException ex ) when ( ex . ErrorCode == FbNetworkError )
107
107
{
108
- logger . WriteError ( "Could not access server. The server: {0} is probably not started." , builder . DataSource ) ;
108
+ logger . LogError ( "Could not access server. The server: {0} is probably not started." , builder . DataSource ) ;
109
109
throw ;
110
110
}
111
111
catch ( FbException )
112
112
{
113
- logger . WriteError ( "Ensure Database: Unknown firebird error when trying to access the server: {0}." , builder . DataSource ) ;
113
+ logger . LogError ( "Ensure Database: Unknown firebird error when trying to access the server: {0}." , builder . DataSource ) ;
114
114
throw ;
115
115
}
116
116
catch ( Exception )
117
117
{
118
- logger . WriteError ( "Ensure Database: Unknown error when trying to access the server: {0}." , builder . DataSource ) ;
118
+ logger . LogError ( "Ensure Database: Unknown error when trying to access the server: {0}." , builder . DataSource ) ;
119
119
throw ;
120
120
}
121
121
}
@@ -140,7 +140,7 @@ public static void FirebirdDatabase(this SupportedDatabasesForDropDatabase suppo
140
140
if ( File . Exists ( builder . Database ) )
141
141
{
142
142
FbConnection . DropDatabase ( builder . ToString ( ) ) ;
143
- logger . WriteInformation ( "Dropped database {0}" , builder . Database ) ;
143
+ logger . LogInformation ( "Dropped database {0}" , builder . Database ) ;
144
144
}
145
145
}
146
146
else
@@ -150,25 +150,25 @@ public static void FirebirdDatabase(this SupportedDatabasesForDropDatabase suppo
150
150
//There seems to be an error in the FirebirdClient when trying to drop a database that does not exist.
151
151
//It gives a NullRefException instead of the expected FbException.
152
152
FbConnection . DropDatabase ( builder . ToString ( ) ) ;
153
- logger . WriteInformation ( "Dropped database {0}" , builder . Database ) ;
153
+ logger . LogInformation ( "Dropped database {0}" , builder . Database ) ;
154
154
}
155
155
catch ( FbException ex ) when ( ex . ErrorCode == FbIoError )
156
156
{
157
- logger . WriteWarning ( "Nothing to Drop. No database found." ) ;
157
+ logger . LogWarning ( "Nothing to Drop. No database found." ) ;
158
158
}
159
159
catch ( FbException ex ) when ( ex . ErrorCode == FbLockTimeout )
160
160
{
161
- logger . WriteError ( "Can't drop database. Are there still an active connection?" ) ;
161
+ logger . LogError ( "Can't drop database. Are there still an active connection?" ) ;
162
162
throw ;
163
163
}
164
164
catch ( FbException )
165
165
{
166
- logger . WriteError ( "Drop Database: Unknown firebird error when trying to access the server: {0}." , builder . DataSource ) ;
166
+ logger . LogError ( "Drop Database: Unknown firebird error when trying to access the server: {0}." , builder . DataSource ) ;
167
167
throw ;
168
168
}
169
169
catch ( Exception )
170
170
{
171
- logger . WriteError ( "Drop Database: Unknown error when trying to access the server: {0}." , builder . DataSource ) ;
171
+ logger . LogError ( "Drop Database: Unknown error when trying to access the server: {0}." , builder . DataSource ) ;
172
172
throw ;
173
173
}
174
174
}
0 commit comments