diff --git a/docs/docs-manifest.json b/docs/docs-manifest.json index 3c1263fd490..92808bf5e37 100644 --- a/docs/docs-manifest.json +++ b/docs/docs-manifest.json @@ -350,7 +350,7 @@ { "post_title": "Logging in WooCommerce", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/logging.md", - "hash": "2cb0d0d594481127d144a95ccf8ca8ca826711dbf25a42fdc69a75c7d200d99f", + "hash": "7f5777df46d83e49b024ae205111e0a0960d8c53466d351a8744999d256cb0c0", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/logging.md", "id": "c684e2efba45051a4e1f98eb5e6ef6bab194f25c" }, @@ -916,11 +916,6 @@ ], "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", @@ -1209,5 +1204,5 @@ "categories": [] } ], - "hash": "a485b51014a2262571751ae495976ca40aa8ffd4fddc7ee8ca8171ee51bd8984" + "hash": "2453d3ac64b6f1f4f4cd8efddfc166602f7182a9dff17218070fd2dccf8722e5" } \ No newline at end of file diff --git a/docs/extension-development/logging.md b/docs/extension-development/logging.md index e3a651410a4..16fe42ace5a 100644 --- a/docs/extension-development/logging.md +++ b/docs/extension-development/logging.md @@ -48,7 +48,7 @@ Uncheck the box here to turn off all logging. This is not recommended in most ci Out-of-the-box, WooCommerce has two different log storage methods available: -* **File system** - Log entries are recorded to files. Files are differentiated by the `source` value for the log entry (see the "Adding logs" section below), and by the current date. The files are stored in `wp-content/uploads/wc-logs`, but this can be changed by defining the `WC_LOG_DIR` constant in your `wp-config.php` file with a custom path. Log files can be up to 5 MB in size, after which the log file will rotate. +* **File system** - Log entries are recorded to files. Files are differentiated by the `source` value for the log entry (see the "Adding logs" section below), and by the current date. The files are stored in the `wc-logs` subdirectory of the site's `uploads` directory. A custom directory can be defined using the `woocommerce_log_directory` filter hook. Log files can be up to 5 MB in size, after which the log file will rotate. * **Database** - Log entries are recorded to the database, in the `{$wpdb->prefix}woocommerce_log` table. If you change this setting, and you already have some log entries, those entries will not be migrated to the other storage method, but neither will they be deleted. diff --git a/plugins/woocommerce/changelog/try-log-file-multisite b/plugins/woocommerce/changelog/try-log-file-multisite new file mode 100644 index 00000000000..bc31145fa67 --- /dev/null +++ b/plugins/woocommerce/changelog/try-log-file-multisite @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Improve compatibility of the logging system with multisite diff --git a/plugins/woocommerce/includes/admin/views/html-admin-page-status-logs.php b/plugins/woocommerce/includes/admin/views/html-admin-page-status-logs.php index 443d17864dc..6a40c1eb9d0 100644 --- a/plugins/woocommerce/includes/admin/views/html-admin-page-status-logs.php +++ b/plugins/woocommerce/includes/admin/views/html-admin-page-status-logs.php @@ -5,10 +5,14 @@ * @package WooCommerce\Admin\Logs */ +use Automattic\WooCommerce\Utilities\LoggingUtil; + if ( ! defined( 'ABSPATH' ) ) { exit; } +$log_directory = LoggingUtil::get_log_directory(); + ?>
@@ -25,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {