docs: add section on logger usage for plugins (#2139)
This commit is contained in:
		
							parent
							
								
									eb32d79ce4
								
							
						
					
					
						commit
						0ce4846b68
					
				| @ -237,6 +237,20 @@ if (env.GITHUB_TOKEN) { | |||||||
|   //... |   //... | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
|  | ## Logger | ||||||
|  | Use `context.logger` to provide debug logging in the plugin. | ||||||
|  | 
 | ||||||
|  | ```js | ||||||
|  | const { logger } = context; | ||||||
|  | 
 | ||||||
|  | logger.log('Some message from plugin.').  | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | The above usage yields the following where `PLUGIN_PACKAGE_NAME` is automatically inferred. | ||||||
|  | 
 | ||||||
|  | ``` | ||||||
|  | [3:24:04 PM] [semantic-release] [PLUGIN_PACKAGE_NAME] › ℹ  Some message from plugin. | ||||||
|  | ``` | ||||||
| 
 | 
 | ||||||
| ## Execution order | ## Execution order | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user