Changeset 2209260
- Timestamp:
- 12/10/2019 12:42:24 PM (6 years ago)
- File:
-
- 1 edited
-
log-http-requests/trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
log-http-requests/trunk/readme.txt
r2209255 r2209260 20 20 Customize the length (in days) before older log items are removed: 21 21 22 ```php 22 <pre> 23 23 add_filter( 'lhr_expiration_days', function( $days ) { 24 24 return 7; // default = 1 25 25 }); 26 ``` 26 </pre> 27 27 28 28 Don't log items from a specific hostname: 29 29 30 ```php 30 <pre> 31 31 add_filter( 'lhr_log_data', function( $data ) { 32 32 if ( false !== strpos( $data['url'], 'wordpress.org' ) ) { … … 35 35 return $data; 36 36 }); 37 ``` 37 </pre> 38 38 39 39 In the above example, the `$data` array keys correspond to columns within the `lhr_log` database table.
Note: See TracChangeset
for help on using the changeset viewer.