@@ -25,6 +25,7 @@ export class PersistentStorage {
25
25
private static readonly urimapsSearchHistory : string = "urimapsSearchHistory" ;
26
26
private static readonly pipelineSearchHistory : string = "pipelineSearchHistory" ;
27
27
private static readonly webserviceSearchHistory : string = "webserviceSearchHistory" ;
28
+ private static readonly cicsZoweLoggerSetting : string = "cicsZoweLoggerSetting" ;
28
29
29
30
private mProgramSearchHistory : string [ ] = [ ] ;
30
31
private mLibrarySearchHistory : string [ ] = [ ] ;
@@ -37,6 +38,7 @@ export class PersistentStorage {
37
38
private mURIMapsSearchHistory : string [ ] = [ ] ;
38
39
private mPipelineSearchHistory : string [ ] = [ ] ;
39
40
private mWebServiceSearchHistory : string [ ] = [ ] ;
41
+ private mCicsZoweLoggerSetting : string = "INFO" ;
40
42
41
43
constructor ( schema : string ) {
42
44
this . schema = schema ;
@@ -55,6 +57,7 @@ export class PersistentStorage {
55
57
let urimapsSearchHistoryLines : string [ ] | undefined ;
56
58
let pipelineSearchHistoryLines : string [ ] | undefined ;
57
59
let webserviceSearchHistoryLines : string [ ] | undefined ;
60
+ let cicsZoweLoggerSetting : string ;
58
61
59
62
if ( workspace . getConfiguration ( this . schema ) ) {
60
63
programSearchHistoryLines = workspace . getConfiguration ( this . schema ) . get ( PersistentStorage . programSearchHistory ) ;
@@ -68,6 +71,7 @@ export class PersistentStorage {
68
71
urimapsSearchHistoryLines = workspace . getConfiguration ( this . schema ) . get ( PersistentStorage . urimapsSearchHistory ) ;
69
72
pipelineSearchHistoryLines = workspace . getConfiguration ( this . schema ) . get ( PersistentStorage . pipelineSearchHistory ) ;
70
73
webserviceSearchHistoryLines = workspace . getConfiguration ( this . schema ) . get ( PersistentStorage . webserviceSearchHistory ) ;
74
+ cicsZoweLoggerSetting = workspace . getConfiguration ( this . schema ) . get ( PersistentStorage . cicsZoweLoggerSetting ) ;
71
75
}
72
76
if ( programSearchHistoryLines ) {
73
77
this . mProgramSearchHistory = programSearchHistoryLines ;
@@ -160,6 +164,10 @@ export class PersistentStorage {
160
164
return this . mWebServiceSearchHistory ;
161
165
}
162
166
167
+ public getCicsZoweLoggerSetting ( ) : string {
168
+ return this . mCicsZoweLoggerSetting ;
169
+ }
170
+
163
171
public async resetProgramSearchHistory ( ) : Promise < void > {
164
172
this . mProgramSearchHistory = [ ] ;
165
173
await this . updateProgramSearchHistory ( ) ;
@@ -205,6 +213,11 @@ export class PersistentStorage {
205
213
await this . updateWebServiceSearchHistory ( ) ;
206
214
}
207
215
216
+ public async resetCicsZoweLoggerSetting ( ) : Promise < void > {
217
+ this . mCicsZoweLoggerSetting = "INFO" ;
218
+ await this . updateCicsZoweLoggerSetting ( ) ;
219
+ }
220
+
208
221
private async updateProgramSearchHistory ( ) : Promise < void > {
209
222
const settings : any = { ...workspace . getConfiguration ( this . schema ) } ;
210
223
if ( settings . persistence ) {
@@ -285,6 +298,14 @@ export class PersistentStorage {
285
298
}
286
299
}
287
300
301
+ private async updateCicsZoweLoggerSetting ( ) : Promise < void > {
302
+ const settings : any = { ...workspace . getConfiguration ( this . schema ) } ;
303
+ if ( settings . persistence ) {
304
+ settings [ PersistentStorage . cicsZoweLoggerSetting ] = this . mCicsZoweLoggerSetting ;
305
+ await workspace . getConfiguration ( ) . update ( this . schema , settings , ConfigurationTarget . Global ) ;
306
+ }
307
+ }
308
+
288
309
public async addProgramSearchHistory ( criteria : string ) : Promise < void > {
289
310
if ( criteria ) {
290
311
this . mProgramSearchHistory = this . mProgramSearchHistory . filter ( ( element ) => {
@@ -446,6 +467,14 @@ export class PersistentStorage {
446
467
}
447
468
}
448
469
470
+ public async addCicsZoweLoggerSetting ( criteria : string ) : Promise < void > {
471
+ if ( criteria ) {
472
+ this . mCicsZoweLoggerSetting = criteria . trim ( ) ;
473
+
474
+ await this . updateCicsZoweLoggerSetting ( ) ;
475
+ }
476
+ }
477
+
449
478
public async removeLoadedCICSProfile ( name : string ) : Promise < void > {
450
479
if ( name ) {
451
480
this . mLoadedCICSProfile = this . mLoadedCICSProfile . filter ( ( element ) => {
0 commit comments