4
4
*/
5
5
6
6
import { extensionSettingsPrefix } from '../../constants'
7
- import { getLogger , Logger } from '../../logger'
7
+ import { getLogger } from '../../logger'
8
8
import { DefaultSettingsConfiguration } from '../../settingsConfiguration'
9
9
import { ChildProcess , ChildProcessResult } from '../../utilities/childProcess'
10
10
import { DefaultSamCliConfiguration , SamCliConfiguration } from './samCliConfiguration'
@@ -17,15 +17,13 @@ import { DefaultSamCliLocationProvider } from './samCliLocator'
17
17
18
18
export interface SamCliProcessInvokerContext {
19
19
cliConfig : SamCliConfiguration
20
- logger : Logger
21
20
}
22
21
23
22
export class DefaultSamCliProcessInvokerContext implements SamCliProcessInvokerContext {
24
23
public cliConfig : SamCliConfiguration = new DefaultSamCliConfiguration (
25
24
new DefaultSettingsConfiguration ( extensionSettingsPrefix ) ,
26
25
new DefaultSamCliLocationProvider ( )
27
26
)
28
- public logger : Logger = getLogger ( )
29
27
}
30
28
31
29
export function resolveSamCliProcessInvokerContext (
@@ -34,8 +32,7 @@ export function resolveSamCliProcessInvokerContext(
34
32
const defaults = new DefaultSamCliProcessInvokerContext ( )
35
33
36
34
return {
37
- cliConfig : params . cliConfig || defaults . cliConfig ,
38
- logger : params . logger || defaults . logger
35
+ cliConfig : params . cliConfig || defaults . cliConfig
39
36
}
40
37
}
41
38
@@ -59,7 +56,7 @@ export class DefaultSamCliProcessInvoker implements SamCliProcessInvoker {
59
56
const samCliLocation : string | undefined = this . context . cliConfig . getSamCliLocation ( )
60
57
if ( ! samCliLocation ) {
61
58
const err = new Error ( 'SAM CLI location not configured' )
62
- this . context . logger . error ( err )
59
+ getLogger ( ) . error ( err )
63
60
throw err
64
61
}
65
62
0 commit comments