Update logger network after modifying config
This commit is contained in:
		
							parent
							
								
									cb8fdb5e8d
								
							
						
					
					
						commit
						45dbc6c6f6
					
				| @ -24,8 +24,9 @@ class LndApi implements AbstractLightningApi { | |||||||
|         timeout: config.LND.TIMEOUT |         timeout: config.LND.TIMEOUT | ||||||
|       }; |       }; | ||||||
|     } catch (e) { |     } catch (e) { | ||||||
|       logger.err(`Could not initialize LND Macaroon/TLS Cert. Disabling LIGHTNING. ` + (e instanceof Error ? e.message : e)); |  | ||||||
|       config.LIGHTNING.ENABLED = false; |       config.LIGHTNING.ENABLED = false; | ||||||
|  |       logger.updateNetwork(); | ||||||
|  |       logger.err(`Could not initialize LND Macaroon/TLS Cert. Disabling LIGHTNING. ` + (e instanceof Error ? e.message : e)); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -69,6 +69,10 @@ class Logger { | |||||||
|     this.network = this.getNetwork(); |     this.network = this.getNetwork(); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |   public updateNetwork(): void { | ||||||
|  |     this.network = this.getNetwork(); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   private addprio(prio): void { |   private addprio(prio): void { | ||||||
|     this[prio] = (function(_this) { |     this[prio] = (function(_this) { | ||||||
|       return function(msg, tag?: string) { |       return function(msg, tag?: string) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user