@@ -63,7 +63,7 @@ class FuseManager extends EventEmitter {
63
63
log . debug ( 'attempting to refresh the root drive if it exists.' )
64
64
const rootDriveMeta = await this . _getRootDriveInfo ( )
65
65
const { opts = { } , mnt = constants . mountpoint } = rootDriveMeta || { }
66
- log . debug ( { opts , mnt } , 'refreshing root mount on restart' )
66
+ log . debug ( 'refreshing root mount on restart' )
67
67
await this . mount ( mnt , opts )
68
68
return true
69
69
}
@@ -72,7 +72,7 @@ class FuseManager extends EventEmitter {
72
72
log . debug ( 'getting root drive metadata' )
73
73
try {
74
74
const rootDriveMeta = await this . db . get ( 'root-drive' )
75
- log . debug ( { rootDriveMeta } , 'got root drive metadata' )
75
+ log . debug ( 'got root drive metadata' )
76
76
return rootDriveMeta
77
77
} catch ( err ) {
78
78
if ( ! err . notFound ) throw err
@@ -259,7 +259,7 @@ class FuseManager extends EventEmitter {
259
259
260
260
try {
261
261
const key = datEncoding . decode ( match . groups . key )
262
- log . debug ( { key : match . groups . key , filename } , 'opening stats file for drive' )
262
+ log . debug ( { filename } , 'opening stats file for drive' )
263
263
const drive = await this . driveManager . get ( key )
264
264
var stats = null
265
265
@@ -306,7 +306,7 @@ class FuseManager extends EventEmitter {
306
306
if ( ! match . groups . key || ! match . groups . filename ) return cb ( fuse . ENOENT )
307
307
const filename = match . groups . filename
308
308
if ( filename !== 'networking.json' && filename !== 'storage.json' ) return cb ( fuse . ENOENT )
309
- log . debug ( { key : match . groups . key , filename } , 'closing stats file' )
309
+ log . debug ( { filename } , 'closing stats file' )
310
310
return this . _virtualFiles . close ( ...[ ...args , cb ] )
311
311
}
312
312
@@ -472,7 +472,7 @@ class FuseManager extends EventEmitter {
472
472
mnt = mnt || constants . mountpoint
473
473
474
474
await ensureFuse ( )
475
- log . debug ( { mnt, mountOpts } , 'mounting a drive' )
475
+ log . debug ( { mnt } , 'mounting a drive' )
476
476
477
477
// TODO: Stop using the hash field to pass this flag once hashes are supported.
478
478
if ( mnt === constants . mountpoint && ( ! mountOpts . hash || ( mountOpts . hash . toString ( ) !== 'force' ) ) ) {
@@ -490,7 +490,7 @@ class FuseManager extends EventEmitter {
490
490
return mountSubdrive ( relativePath , drive )
491
491
492
492
async function mountSubdrive ( relativePath , drive ) {
493
- log . debug ( { key : drive . key . toString ( 'hex' ) } , 'mounting a sub-hyperdrive' )
493
+ log . debug ( { discoveryKey : drive . discoveryKey . toString ( 'hex' ) } , 'mounting a sub-hyperdrive' )
494
494
mountOpts . uid = process . getuid ( )
495
495
mountOpts . gid = process . getgid ( )
496
496
return new Promise ( ( resolve , reject ) => {
@@ -502,7 +502,7 @@ class FuseManager extends EventEmitter {
502
502
}
503
503
504
504
async function mountRoot ( drive ) {
505
- log . debug ( { key : drive . key . toString ( 'hex' ) } , 'mounting the root drive' )
505
+ log . debug ( { discoveryKey : drive . discoveryKey . toString ( 'hex' ) } , 'mounting the root drive' )
506
506
507
507
const fuse = new HyperdriveFuse ( drive , constants . mountpoint , {
508
508
force : true ,
@@ -514,7 +514,7 @@ class FuseManager extends EventEmitter {
514
514
const wrappedHandlers = self . _wrapHandlers ( handlers )
515
515
await fuse . mount ( wrappedHandlers )
516
516
517
- log . debug ( { mnt, wrappedHandlers } , 'mounted the root drive' )
517
+ log . debug ( { mnt } , 'mounted the root drive' )
518
518
mountOpts . key = drive . key
519
519
520
520
await self . db . put ( 'root-drive' , { mnt, opts : { ...mountOpts , key : datEncoding . encode ( drive . key ) } } )
@@ -531,7 +531,7 @@ class FuseManager extends EventEmitter {
531
531
if ( err ) log . error ( { error : err } , 'mountpoint error' )
532
532
self . driveManager . createSession ( null , feed . key )
533
533
. then ( ( ) => {
534
- log . info ( { key : feed . key . toString ( 'hex' ) } , 'created session for mountpoint' )
534
+ log . info ( { discoveryKey : feed . discoveryKey . toString ( 'hex' ) } , 'created session for mountpoint' )
535
535
} )
536
536
. catch ( err => {
537
537
log . error ( { error : err } , 'could not create session for mountpoint' )
@@ -586,12 +586,12 @@ class FuseManager extends EventEmitter {
586
586
// The corestore name is not very important here, since the initial drive will be discarded after mount.
587
587
const drive = await this . _createDrive ( null , { ...this . opts , name : crypto . randomBytes ( 64 ) . toString ( 'hex' ) } )
588
588
589
- log . debug ( { path, key : drive . key . toString ( 'hex' ) } , 'mounting a drive at a path' )
589
+ log . debug ( { path, discoveryKey : drive . discoveryKey . toString ( 'hex' ) } , 'mounting a drive at a path' )
590
590
return new Promise ( ( resolve , reject ) => {
591
591
const innerPath = path . slice ( this . _rootMnt . length )
592
592
this . _rootDrive . mount ( innerPath , opts , err => {
593
593
if ( err ) return reject ( err )
594
- log . debug ( { path, key : drive . key . toString ( 'hex' ) } , 'drive mounted' )
594
+ log . debug ( { path, discoveryKey : drive . discoveryKey . toString ( 'hex' ) } , 'drive mounted' )
595
595
return resolve ( )
596
596
} )
597
597
} )
0 commit comments