feat: allow setting capture mode and max file size in netLog API (#19215)
This commit is contained in:
		
					parent
					
						
							
								8028c57b42
							
						
					
				
			
			
				commit
				
					
						477661d0e4
					
				
			
		
					 5 changed files with 102 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -22,9 +22,17 @@ of the `app` module gets emitted.
 | 
			
		|||
 | 
			
		||||
## Methods
 | 
			
		||||
 | 
			
		||||
### `netLog.startLogging(path)`
 | 
			
		||||
### `netLog.startLogging(path[, options])`
 | 
			
		||||
 | 
			
		||||
* `path` String - File path to record network logs.
 | 
			
		||||
* `options` Object (optional)
 | 
			
		||||
  * `captureMode` String (optional) - What kinds of data should be captured. By
 | 
			
		||||
    default, only metadata about requests will be captured. Setting this to
 | 
			
		||||
    `includeSensitive` will include cookies and authentication data. Setting
 | 
			
		||||
    it to `everything` will include all bytes transferred on sockets. Can be
 | 
			
		||||
    `default`, `includeSensitive` or `everything`.
 | 
			
		||||
  * `maxFileSize` Number (optional) - When the log grows beyond this size,
 | 
			
		||||
    logging will automatically stop. Defaults to unlimited.
 | 
			
		||||
 | 
			
		||||
Returns `Promise<void>` - resolves when the net log has begun recording.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue