diff --git a/src/system/decorators.ts b/src/system/decorators.ts index c9945c7..f0ad6de 100644 --- a/src/system/decorators.ts +++ b/src/system/decorators.ts @@ -136,8 +136,8 @@ export function log( const p = parameters[index]; let loggable; - if (typeof options.args === 'object' && options.args[p]) { - loggable = options.args[p](v); + if (typeof options.args === 'object' && options.args[index]) { + loggable = options.args[index](v); } else { if (typeof v === 'object') { @@ -209,7 +209,7 @@ export function log( catch (ex) { exit = `@log.exit error: ${ex}`; } - logFn(key, `completed${timing}${exit}`); + logFn(prefix, `completed${timing}${exit}`); } return result; } diff --git a/src/views/nodes/repositoryNode.ts b/src/views/nodes/repositoryNode.ts index 59afec2..fa1324f 100644 --- a/src/views/nodes/repositoryNode.ts +++ b/src/views/nodes/repositoryNode.ts @@ -262,7 +262,7 @@ export class RepositoryNode extends SubscribeableViewNode { @debug({ args: { - e: (e: RepositoryFileSystemChangeEvent) => + 0: (e: RepositoryFileSystemChangeEvent) => `{ repository: ${e.repository ? e.repository.name : ''}, uris: [${e.uris .map(u => u.fsPath) .join(', ')}] }` @@ -274,7 +274,7 @@ export class RepositoryNode extends SubscribeableViewNode { @debug({ args: { - e: (e: RepositoryChangeEvent) => + 0: (e: RepositoryChangeEvent) => `{ repository: ${e.repository ? e.repository.name : ''}, changes: ${e.changes.join()} }` } }) diff --git a/src/views/viewBase.ts b/src/views/viewBase.ts index 3f19724..5b45c01 100644 --- a/src/views/viewBase.ts +++ b/src/views/viewBase.ts @@ -148,7 +148,7 @@ export abstract class ViewBase implements TreeDataProvid } @debug({ - args: { node: (n: ViewNode) => `${n.constructor.name}${n.id ? `(${n.id})` : ''}` } + args: { 0: (n: ViewNode) => `${n.constructor.name}${n.id != null ? `(${n.id})` : ''}` } }) async refreshNode(node: ViewNode, args?: RefreshNodeCommandArgs) { if (args !== undefined) { @@ -169,7 +169,7 @@ export abstract class ViewBase implements TreeDataProvid } @log({ - args: { node: (n: ViewNode) => `${n.constructor.name}${n.id ? `(${n.id})` : ''}` } + args: { 0: (n: ViewNode) => `${n.constructor.name}${n.id != null ? `(${n.id})` : ''}` } }) async reveal( node: ViewNode, @@ -198,7 +198,7 @@ export abstract class ViewBase implements TreeDataProvid } @debug({ - args: { node: (n?: ViewNode) => (n != null ? `${n.constructor.name}${n.id ? `(${n.id})` : ''}` : '') } + args: { 0: (n?: ViewNode) => (n != null ? `${n.constructor.name}${n.id != null ? `(${n.id})` : ''}` : '') } }) triggerNodeChange(node?: ViewNode) { // Since the root node won't actually refresh, force everything