@@ -86,7 +86,8 @@ import {
8686 notificationFilterMinimumSeverityLevel ,
8787 AuthTokenManager ,
8888 AuthTokenAndExpiration ,
89- expirationBasedAuthTokenManager
89+ expirationBasedAuthTokenManager ,
90+ types as coreTypes
9091} from 'neo4j-driver-core'
9192import {
9293 AuthToken ,
@@ -120,6 +121,18 @@ declare const auth: {
120121 ) => AuthToken
121122}
122123
124+ /**
125+ * Object containing predefined logging configurations. These are expected to be used as values of the driver config's `logging` property.
126+ * @property {function(level: ?string): object } console the function to create a logging config that prints all messages to `console.log` with
127+ * timestamp, level and message. It takes an optional `level` parameter which represents the maximum log level to be logged. Default value is 'info'.
128+ */
129+ declare const logging : {
130+ console : ( level : coreTypes . LogLevel ) => {
131+ level : coreTypes . LogLevel
132+ logger : ( level : coreTypes . LogLevel , message : string ) => void
133+ }
134+ }
135+
123136declare function driver (
124137 url : string ,
125138 authToken ?: AuthToken | AuthTokenManager ,
@@ -269,6 +282,7 @@ declare const forExport: {
269282 notificationFilterDisabledCategory : typeof notificationFilterDisabledCategory
270283 notificationFilterMinimumSeverityLevel : typeof notificationFilterMinimumSeverityLevel
271284 expirationBasedAuthTokenManager : typeof expirationBasedAuthTokenManager
285+ logging : typeof logging
272286}
273287
274288export {
@@ -343,7 +357,8 @@ export {
343357 notificationSeverityLevel ,
344358 notificationFilterDisabledCategory ,
345359 notificationFilterMinimumSeverityLevel ,
346- expirationBasedAuthTokenManager
360+ expirationBasedAuthTokenManager ,
361+ logging
347362}
348363
349364export type {
0 commit comments