Jon Surrell
66b0620f7c
remove print_r calls from paypal handler
2016-12-29 11:58:42 +01:00
Jon Surrell
96f9de2106
update paypal gateway logs
2016-12-29 11:58:42 +01:00
Jon Surrell
36201d38ec
Update paypal gateway log method
2016-12-29 11:58:42 +01:00
Jon Surrell
7a3c6bcc0c
Fix phpcs issues
2016-12-29 11:58:42 +01:00
Jon Surrell
915266f967
Add wc_safe_dump function
...
Some "safe" server configurations disable certain functions. `wc_safe_dump` attempts to
safely call a series of alternatives suitable for dumping an expression.
2016-12-29 11:58:42 +01:00
Jon Surrell
a0670cfae8
Add woocommerce_format_log_entry filter to base WC_Log_Handler class
2016-12-29 11:58:42 +01:00
Jon Surrell
2283956db6
Provide correct class name to woocommerce_log_handler_set_threshold filter
2016-12-29 11:58:42 +01:00
Jon Surrell
0c5634c99f
Version 1.0.0 for abstract wc log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
d6a6b8771d
Add level views to db log table
2016-12-29 11:58:42 +01:00
Jon Surrell
30fdca65a9
Log viewer via html template
2016-12-29 11:58:42 +01:00
Jon Surrell
bc3f788507
Implements database log viewer
2016-12-29 11:58:42 +01:00
Jon Surrell
f761183363
Update @package for log handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
5a9db9738f
Add DB log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
09ea8b074e
Prefer PHP_EOL over "\n"
2016-12-29 11:58:42 +01:00
Jon Surrell
822981c009
Improve handle signature
...
The signature of WC_Log_Handler::handle mirrors log messages which is more intuitive.
Method docblocks have also been improved and are more complete.
2016-12-29 11:58:42 +01:00
Jon Surrell
e7d6a9a48b
Rotate logs
...
WC_Log_Handler_File now includes log rotation.
Add and improve tests.
2016-12-29 11:58:42 +01:00
Jon Surrell
2a6c95b490
Prevent possible undefined index warning
2016-12-29 11:58:42 +01:00
Jon Surrell
75c3e5e8c6
Fix phpcs warning
2016-12-29 11:58:42 +01:00
Jon Surrell
9adb64b6b9
Restore log deletion from admin log viewer page
...
WC_Logger no longer controls logging and has no knowledge of files.
Correctly handle `remove_log` action via file log handler.
2016-12-29 11:58:42 +01:00
Jon Surrell
b645fa06b7
Improve logic for legacy `->add` message formatting
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88318220
2016-12-29 11:58:42 +01:00
Jon Surrell
ad03597a3d
Simplify default log entry format
...
Remove punctuation. Space separate values:
TIMESTAMP LEVEL MESSAGE
2016-12-29 11:58:42 +01:00
Jon Surrell
611577320f
Include site name in log email message
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88213040
2016-12-29 11:58:42 +01:00
Jon Surrell
f0508a0fc6
Improve log email message format.
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#pullrequestreview-8895028
2016-12-29 11:58:42 +01:00
Jon Surrell
e4c08aa03a
Remove optional from required log handler context array
2016-12-29 11:58:42 +01:00
Jon Surrell
722b288b79
Remove _ from private/protected properties
2016-12-29 11:58:42 +01:00
Jon Surrell
fe02d44e31
Defauly log file level is DEBUG
2016-12-29 11:58:42 +01:00
Jon Surrell
b2935f35ed
Fix file handle regression
2016-12-29 11:58:42 +01:00
Jon Surrell
6ec75d8c2e
Change defualt log handler threshold to DEBUG following discussion with team members.
2016-12-29 11:58:42 +01:00
Jon Surrell
b5cebcab6c
Fix scrutinizer issues
2016-12-29 11:58:42 +01:00
Jon Surrell
d5d1ab16ea
Fix docblocks
2016-12-29 11:58:42 +01:00
Jon Surrell
c5c0563f7c
Restore deprecated functions WC_Logger::clear & WC_Logger::remove
...
Also updates clear test to supply required argument.
2016-12-29 11:58:42 +01:00
Jon Surrell
36873e5097
Provide basic messages for email log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
479ef85cd8
Add email log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
864e65de10
Remove redundant __constructor
2016-12-29 11:58:42 +01:00
Jon Surrell
4262a72af6
Use wp_parse_args for default args
2016-12-29 11:58:42 +01:00
Jon Surrell
9dc30a7203
Remove 2nd filter parameter that would never be called
2016-12-29 11:58:42 +01:00
Jon Surrell
44ea69c579
Adds tests for bubbling, etc.
...
Add tests teardown to cleanup log files
Fix errors in log handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
0e0433195d
Add logic for log level filtering to `WC_Log_Handler`.
2016-12-29 11:58:42 +01:00
Jon Surrell
9a0efcfe55
Add abstract WC_Log_Handler class
...
Abstract base class is implemented with default formatting implementations.
`$timestamp` has been added to the `WC_Log_Handler::handle` implementation. This ensures all handlers are passed the same timestamp for the same message.
`_legacy` context has been added to `WC_Log_Handler_File` to ensure handle deprecated `WC_Logger::add` provides the same log entries as before.
Fix CS problems.
2016-12-29 11:58:42 +01:00
Jon Surrell
a2cce14711
Register file log handler by default
...
Add wc_register_file_log_handler function.
Calls add_filter with register function to include handler by default
2016-12-29 11:58:42 +01:00
Jon Surrell
d9dcabf8f2
WC_Logger registers and delegates logging to handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
e922efb0f7
Extract file log handler
2016-12-29 11:58:42 +01:00
Manos Psychogyiopoulos
b5c56737c5
merge branch 'master' into fix-product-search-get-post-parent-fatal-error
2016-12-27 10:57:52 +02:00
Manos Psychogyiopoulos
be436b629d
fix include field typo
2016-12-27 10:36:44 +02:00
Manos Psychogyiopoulos
ae9f4eacc4
fix get_post_parent fatal error
2016-12-27 10:34:32 +02:00
Claudio Sanches
539099c7d7
Include $endpoint in woocommerce_endpoint_X_title filter #12676
2016-12-25 20:43:25 -02:00
Mike Jolley
daea231ab7
Merge pull request #12666 from woocommerce/select2-4
...
Upgrade Select2 to V4
2016-12-24 14:40:09 +00:00
Mike Jolley
6b511e84be
Sorting
2016-12-23 15:14:27 +00:00
Mike Jolley
e9be3a425a
Handle search params in filters
...
Closes #12685
2016-12-23 14:45:58 +00:00
Mike Jolley
a3f8ffb101
Ensure price is set
2016-12-23 14:30:47 +00:00