@@ -26,18 +26,18 @@ function init(cfg) {
26
26
cfg . database
27
27
} ${ ( cfg . domain ) ? `?domain=${ cfg . domain } &encrypt=${ cfg . encrypt } `
28
28
: `?encrypt=${ cfg . encrypt } ` } `;
29
- logger . trace ( conString ) ;
29
+ logger . debug ( 'Connection string is created' ) ;
30
30
return co ( function * gen ( ) {
31
31
logger . info ( 'Connecting to the database' ) ;
32
32
const connection = new cosql . Connection ( conString ) ;
33
33
// Always attach an error listener
34
- connection . on ( 'error' , ( err ) => this . emit ( 'error' , err ) ) ;
34
+ connection . on ( 'error' , err => this . emit ( 'error' , err ) ) ;
35
35
let sql = cfg . query ;
36
36
yield connection . connect ( ) ;
37
37
logger . info ( 'Connection established' ) ;
38
- logger . trace ( 'Preparing query=%s' , sql ) ;
38
+ logger . debug ( 'Preparing query...' ) ;
39
39
const vars = sql . match ( VARS_REGEXP ) ;
40
- logger . trace ( 'Found following prepared variable:type pairs=%j' , vars ) ;
40
+ logger . debug ( 'Found prepared variable:type pairs' ) ;
41
41
pstmt = new cosql . PreparedStatement ( connection ) ;
42
42
for ( const tuple of vars ) {
43
43
const [ placeholder , type ] = tuple . split ( ':' ) ;
@@ -74,7 +74,7 @@ function init(cfg) {
74
74
// Now let's remove all :string :boolean :date etc to the name only
75
75
sql = sql . replace ( tuple , placeholder ) ;
76
76
}
77
- logger . trace ( 'Resulting SQL=%s' , sql ) ;
77
+ logger . trace ( 'Resulting SQL is ready' ) ;
78
78
yield pstmt . prepare ( sql ) ;
79
79
logger . info ( 'Preparing statement created' ) ;
80
80
} . bind ( this ) ) ;
0 commit comments