Update logging.md (#44908)
* Update logging.md * Add changelog file * Update docs manifest file --------- Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
This commit is contained in:
parent
e5ebc61d81
commit
4f24fdcabb
|
@ -350,7 +350,7 @@
|
|||
{
|
||||
"post_title": "Logging in WooCommerce",
|
||||
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/logging.md",
|
||||
"hash": "dbe7c96a7ffd9d8c95fdc07eba211f03840bc47d3c49f8cb0eff8363d4ad826d",
|
||||
"hash": "2cb0d0d594481127d144a95ccf8ca8ca826711dbf25a42fdc69a75c7d200d99f",
|
||||
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/logging.md",
|
||||
"id": "c684e2efba45051a4e1f98eb5e6ef6bab194f25c"
|
||||
},
|
||||
|
@ -916,6 +916,11 @@
|
|||
],
|
||||
"categories": []
|
||||
},
|
||||
{
|
||||
"category_slug": "utilities",
|
||||
"category_title": "Utilities",
|
||||
"categories": []
|
||||
},
|
||||
{
|
||||
"content": "\nThis section covers general guidelines, and best practices to follow in order to ensure your product experience aligns with WooCommerce for ease of use, seamless integration, and strong adoption.\n\nWe strongly recommend you review the current [WooCommerce setup experience](https://woo.com/documentation/plugins/woocommerce/getting-started/) to get familiar with the user experience and taxonomy.\n\nWe also recommend you review the [WordPress core guidelines](https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/) to ensure your product isn't breaking any rules, and review [this helpful resource](https://woo.com/document/grammar-punctuation-style-guide/) on content style.\n\n## General\n\nUse existing WordPress/WooCommerce UI, built in components (text fields, checkboxes, etc) and existing menu structures.\n\nPlugins which draw on WordPress' core design aesthetic will benefit from future updates to this design as WordPress continues to evolve. If you need to make an exception for your product, be prepared to provide a valid use case.\n\n- [WordPress Components library](https://wordpress.github.io/gutenberg/?path=/story/docs-introduction--page)\n- [Figma for WordPress](https://make.wordpress.org/design/2018/11/19/figma-for-wordpress/) | ([WordPress Design Library Figma](https://www.figma.com/file/e4tLacmlPuZV47l7901FEs/WordPress-Design-Library))\n- [WooCommerce Component Library](https://woocommerce.github.io/woocommerce-admin/)\n",
|
||||
"category_slug": "user-experience-extensions",
|
||||
|
@ -1204,5 +1209,5 @@
|
|||
"categories": []
|
||||
}
|
||||
],
|
||||
"hash": "ff270b62be7ef787e46c1f99fc5fe2772537a80a55aff540617a1154a90a234c"
|
||||
"hash": "a485b51014a2262571751ae495976ca40aa8ffd4fddc7ee8ca8171ee51bd8984"
|
||||
}
|
|
@ -12,17 +12,17 @@ You can view the entries created by the logger by going to **WooCommerce > Statu
|
|||
|
||||
With the default file system storage method, the first thing you will see is the list of existing log files:
|
||||
|
||||
![The default log viewing interface, showing a list of log files](file-browser.png)
|
||||
![The default log viewing interface, showing a list of log files](https://developer.woo.com/docs/wp-content/uploads/sites/3/2024/02/file-browse.png)
|
||||
|
||||
The name of a log file is based on the source of the entries it contains (meaning the extension or the part of the WooCommerce codebase), as well as the date the entries were generated. In this file browsing view, you can sort the files in different ways as well as filtering them to show only those from a specific source. Clicking on a file will take you to a single file view, where you can see the actual log entries:
|
||||
|
||||
![The contents of a log file](file-view-new.png)
|
||||
![The contents of a log file](https://developer.woo.com/docs/wp-content/uploads/sites/3/2024/02/file-view-new.png)
|
||||
|
||||
Click on a line number in the file to highlight it. This can also be used to link to a specific line in a file from elsewhere.
|
||||
|
||||
From the file browser view, you can sort and filter a list of log files, and then search for a string within the contents of those files:
|
||||
|
||||
![A list of search results](search-results.png)
|
||||
![A list of search results](https://developer.woo.com/docs/wp-content/uploads/sites/3/2024/02/search-results.png)
|
||||
|
||||
Clicking on a search result line number will take you to that line in the single file view.
|
||||
|
||||
|
@ -30,7 +30,7 @@ Clicking on a search result line number will take you to that line in the single
|
|||
|
||||
With the database storage method, you will see a list of log entries, starting with the most recent:
|
||||
|
||||
![The log viewing interface when log entries are stored in the database](database-logs.png)
|
||||
![The log viewing interface when log entries are stored in the database](https://developer.woo.com/docs/wp-content/uploads/sites/3/2024/02/database-logs.png)
|
||||
|
||||
These entries can be sorted by timestamp, level, and source, as well as filtered to only show a particular source or a minimum level. You can also search for a string within the log entry message fields.
|
||||
|
||||
|
@ -38,7 +38,7 @@ These entries can be sorted by timestamp, level, and source, as well as filtered
|
|||
|
||||
From the Logs screen at **WooCommerce > Status > Logs**, click the "Settings" link to make configuration changes:
|
||||
|
||||
![The Logs settings screen](settings.png)
|
||||
![The Logs settings screen](https://developer.woo.com/docs/wp-content/uploads/sites/3/2024/02/settings.png)
|
||||
|
||||
### Logger
|
||||
|
||||
|
@ -104,7 +104,7 @@ If a source is not specified, the logger will generate a source value based on t
|
|||
|
||||
Setting the `backtrace` key in your context parameter to `true` will cause the logger to generate a backtrace (i.e. stack trace) in array format, which will be included in the context in place of the `true` value. This is useful particularly for error-related logs, so you can see what code was executed that led to the log entry being generated.
|
||||
|
||||
![A backtrace displayed in the log file viewer](backtrace.png)
|
||||
![A backtrace displayed in the log file viewer](https://developer.woo.com/docs/wp-content/uploads/sites/3/2024/02/backtrace.png)
|
||||
|
||||
### Full example
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: This just updates a docs file to include correct image URLs
|
||||
|
||||
|
Loading…
Reference in New Issue