File tree Expand file tree Collapse file tree
apps/package-manager/packages/generic/src
expectationManager/src/internalManager/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ export class PackageManagerHandler {
145145
146146 this . coreHandler . setPackageManagerHandler ( this )
147147
148- this . logger . info ( 'PackageManagerHandler init' )
148+ this . logger . info ( 'PackageManagerHandler init... ' )
149149
150150 coreHandler . onConnected ( ( ) => {
151151 this . setupObservers ( )
@@ -157,10 +157,20 @@ export class PackageManagerHandler {
157157 this . onSettingsChanged ( )
158158 this . triggerUpdatedExpectedPackages ( )
159159
160- await this . callbacksHandler . cleanReportedStatuses ( )
161- await this . expectationManager . init ( )
160+ try {
161+ await this . callbacksHandler . cleanReportedStatuses ( )
162+ } catch ( e ) {
163+ this . logger . error ( `Error during cleanReportedStatuses()` )
164+ throw e
165+ }
166+ try {
167+ await this . expectationManager . init ( )
168+ } catch ( e ) {
169+ this . logger . error ( `Error during expectationManager.init()` )
170+ throw e
171+ }
162172
163- this . logger . info ( 'PackageManagerHandler initialized' )
173+ this . logger . info ( 'PackageManagerHandler initialized! ' )
164174 }
165175 onSettingsChanged ( ) : void {
166176 this . settings = {
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ export class WebsocketServer extends HelpfulEventEmitter {
2626
2727 this . wss = new WebSocket . Server ( { port : port } )
2828
29+ this . wss . on ( 'listening' , ( ) => {
30+ this . logger . info ( `Listening on port ${ port } ` )
31+ } )
32+
2933 this . wss . on ( 'close' , ( ) => {
3034 // The websocekt server is closed.
3135
Original file line number Diff line number Diff line change @@ -104,22 +104,22 @@ export class ExpectationManagerServer {
104104 '*' : 'ws://127.0.0.1' ,
105105 }
106106 }
107- this . logger . info ( `##### type: ${ this . workForceConnectionOptions . type } ` )
107+ this . logger . debug ( `##### type: ${ this . workForceConnectionOptions . type } ` )
108108 if ( this . serverOptions . type === 'websocket' && this . serverOptions . port === 0 ) {
109- this . logger . info ( `##### this.serverOptions.port: ${ this . serverOptions . port } ` )
109+ this . logger . debug ( `##### this.serverOptions.port: ${ this . serverOptions . port } ` )
110110 // When the configured port i 0, the next free port is picked
111111 for ( const key of Object . keys ( this . _serverAccessUrls ) ) {
112112 // If no port was specified in the url, add it:
113113 if ( ! this . _serverAccessUrls [ key ] . match ( / \/ \/ [ ^ / ] + : \d / ) ) {
114- this . logger . info ( `updateing ${ key } ` )
114+ this . logger . debug ( `updateing ${ key } ` )
115115 this . _serverAccessUrls [ key ] += `:${ this . manager . expectationManagerServer . websocketServer ?. port } `
116116 }
117117 }
118118 }
119119
120- this . logger . info ( `##### this.serverAccessBaseUrls: ${ JSON . stringify ( this . serverAccessBaseUrls ) } ` )
121- this . logger . info ( `##### websocketServer?.port: ${ this . manager . expectationManagerServer . websocketServer ?. port } ` )
122- this . logger . info ( `##### this._serverAccessUrls: ${ JSON . stringify ( this . _serverAccessUrls ) } ` )
120+ this . logger . debug ( `##### this.serverAccessBaseUrls: ${ JSON . stringify ( this . serverAccessBaseUrls ) } ` )
121+ this . logger . debug ( `##### websocketServer?.port: ${ this . manager . expectationManagerServer . websocketServer ?. port } ` )
122+ this . logger . debug ( `##### this._serverAccessUrls: ${ JSON . stringify ( this . _serverAccessUrls ) } ` )
123123
124124 if ( ! this . _serverAccessUrls ) throw new Error ( `ExpectationManager.serverAccessUrl not set!` )
125125 }
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ export class WorkforceConnection {
5858 } )
5959 }
6060 public async init ( ) : Promise < void > {
61+ if ( this . workForceConnectionOptions . type === 'websocket' ) {
62+ this . logger . info ( `Connecting to Workforce at ${ this . workForceConnectionOptions . url } ` )
63+ }
6164 await this . workforceAPI . init ( this . workForceConnectionOptions , {
6265 setLogLevel : async ( logLevel : LogLevel ) : Promise < void > => {
6366 this . logger . setLogLevel ( logLevel )
Original file line number Diff line number Diff line change @@ -240,6 +240,9 @@ export class WorkerAgent {
240240 const pAppContainer = new Promise < void > ( ( resolve , reject ) => {
241241 this . initAppContainerAPIPromise = { resolve, reject }
242242 } )
243+ if ( this . appContainerConnectionOptions . type === 'websocket' ) {
244+ this . logger . info ( `Connecting to AppContainer at ${ this . appContainerConnectionOptions . url } ` )
245+ }
243246 await this . appContainerAPI . init ( this . appContainerConnectionOptions , {
244247 setLogLevel : async ( logLevel : LogLevel ) => this . setLogLevel ( logLevel ) ,
245248 _debugKill : async ( ) => this . _debugKill ( ) ,
@@ -260,6 +263,9 @@ export class WorkerAgent {
260263 const pWorkForce = new Promise < void > ( ( resolve , reject ) => {
261264 this . initWorkForceAPIPromise = { resolve, reject }
262265 } )
266+ if ( this . workForceConnectionOptions . type === 'websocket' ) {
267+ this . logger . info ( `Connecting to Workforce at ${ this . workForceConnectionOptions . url } ` )
268+ }
263269 await this . workforceAPI . init ( this . workForceConnectionOptions , {
264270 setLogLevel : async ( logLevel : LogLevel ) => this . setLogLevel ( logLevel ) ,
265271 _debugKill : async ( ) => this . _debugKill ( ) ,
You can’t perform that action at this time.
0 commit comments