Gerhard Potgieter
1fdcf2a238
Fix log file deletion functionality.
2018-07-09 13:01:23 +02:00
Mike Jolley
e9b0c6deec
clear_expired_logs and date based clearing functions
2018-05-01 16:37:30 +01:00
Mike Jolley
aef46ce8d3
Clear paypal logs when debug mode is turned off.
2018-04-30 18:04:52 +01:00
Rodrigo Primo
3a76769859
PHPCS fixes in includes/log-handlers/class-wc-log-handler-file.php
2018-03-07 10:49:45 -03:00
Rodrigo Primo
3d93e5d545
PHPCS fixes in includes/log-handlers/class-wc-log-handler-email.php
2018-03-07 10:49:32 -03:00
Rodrigo Primo
2d4afdc1d8
PHPCS fixes in includes/log-handlers/class-wc-log-handler-db.php
2018-03-07 10:49:17 -03:00
Rodrigo Primo
ea93fca4ff
Fix PHPCS violations in includes/log-handlers/ using phpcbf
2018-03-07 10:30:00 -03:00
Gerhard Potgieter
fdc89056cd
PHPCS fix
2017-11-17 14:47:51 +02:00
Gerhard Potgieter
b11ab6d8d6
Convert comments to wc_logger logging, remove and deprecate unused functions and introduce a wc_get_log_file_name helper function. Still a couple of todos left regarding deprecating or removing filters related to comments.
2017-11-10 12:20:59 +02:00
Jaydeep Rami
3522857d23
Fix typo in WooCommerce plugin ( #16135 )
...
* Fixed typo
* Fixed more typo
* Fixed more typo
* Fix tyop
* Fix more typo
* Fix more typo
* Fix typo
* Fix typo
* Fix typo
* Fix typo datatime object
* Fix short name of compat
* Fix typo: update short name
* Fix typo "deactive" to "deactivate" and short BW - Compat
* Fix typo "Backwards compat"
* Fix typo 'parameters'
* Fix more typo 'pararmeters'
* Fix typo 'compund'
* FIx typo order
* Fix typo
* Fix typo 'incorrecly'
* Fix typo 'genarate'
* Fix typo 'reletive'
* Fix typo 'Handly'
* Fix typo 'rotatated'
* Fix typo
* Fix typo 'additonal'
* Fix typos
2017-07-17 11:10:52 +01:00
Rasmus Bengtsson
185934fad9
Fix phpdoc to include params and correct types
2017-05-15 13:50:52 +02:00
Claudio Sanches
1142ca20f0
Properly open log files
2017-04-20 13:37:18 -03:00
Claudio Sanches
dfcbeaf044
Fixed logic in `is_open()`
2017-04-20 12:57:33 -03:00
Claudio Sanches
7f6b0c6d0f
Moved resource check for `is_open()` method
2017-04-20 12:53:44 -03:00
Claudio Sanches
aa21db2e64
Check if is a resource before try set log rotate
...
Fixes #14544
2017-04-20 00:54:31 -03:00
Akeda Bagus
0b416439c8
Fixed all typos of all files in includes/ directory.
...
Scanning and fixing were done automatically by codespell,
https://github.com/lucasdemarchi/codespell .
2017-03-29 00:58:51 +07:00
Claudio Sanches
59c2849736
Changed version 2.7 to 3.0
2017-03-15 13:36:53 -03:00
Mike Jolley
962b60c8fe
kses/sanitize
2017-02-09 15:43:47 +00:00
Jon Surrell
a2dea96430
Add message when get_log_file_path called too early
2017-01-12 22:02:31 +01:00
Jon Surrell
acd338fb87
Add default source to WC_Log_Handler_DB
2017-01-08 21:42:56 +01:00
Jon Surrell
a33fac966d
Use plural in multiple log email
2016-12-29 11:58:43 +01:00
Jon Surrell
fbd91fe376
Improve email handler subject
2016-12-29 11:58:43 +01:00
Jon Surrell
e4d5886427
Replace log `tag` with log `source`
2016-12-29 11:58:43 +01:00
Jon Surrell
088fc5cd68
Delay file log write when written too early
...
The function to look up log file paths depends on `wp_hash`, which is pluggable.
Log files cannot be found before `plugins_loaded` action. In case a log is
written to a file before `wp_hash` is available, cache and write on
`plugins_loaded` action.
2016-12-29 11:58:43 +01:00
Jon Surrell
5700043e6d
Deprecate wc_get_log_file_path
...
wc_get_log_file_path moves into `WC_Log_Handler_File` class as a static
method.
Update deprecations and version info.
2016-12-29 11:58:43 +01:00
Jon Surrell
feefabbdf0
Document _legacy context in WC_Log_Handler_File
2016-12-29 11:58:43 +01:00
Jon Surrell
2ae1bc1ab2
Protect methods
2016-12-29 11:58:43 +01:00
Jon Surrell
fe837c5113
Aggregate email handler messages (max: 1 email/request/handler)
...
Update emails accordingly.
Update email handler tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
acc98a1d6a
Mark WC_Log_Handler::format_entry abstract
2016-12-29 11:58:43 +01:00
Jon Surrell
5f24eca7e2
Add delete to db log viewer table
...
Clean up some nonce logic.
Use a single <form> containing log table.
2016-12-29 11:58:43 +01:00
Jonathan Surrell
4318b3aa53
Improve @return signature on WC_Log_Handler::handle
...
Make meaning of returned bool explicit.
Update WC_Log_Handler_Email::handle accordingly.
via https://github.com/woocommerce/woocommerce/pull/12575#pullrequestreview-12381573
2016-12-29 11:58:43 +01:00
Jon Surrell
080cf8e436
Store log levels as integer representations in database
...
This will allow indexed ordering by severity.
Add WC_Log_Levels::get_severity_level method to translate severity
integers to level strings. The inverse of WC_Log_Levels::get_level_severity.
Add context to tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
78e6cb31a7
Include WC_Log_Handler with other abstracts
2016-12-29 11:58:43 +01:00
Jon Surrell
825d9c9f82
Fix spelling
2016-12-29 11:58:43 +01:00
Jon Surrell
ffd0d380ee
Remove threshold logic from handlers.
...
Email handler implements threshold logic internally. Other handlers handle all logs received.
Handler constructors have changed.
2016-12-29 11:58:43 +01:00
Jon Surrell
85fa9df7fe
Drop "bubbling" support for logs
...
The concept of bubbling or consuming logs has little benefit for our use case.
Drop support for bubbling and simplify logging.
2016-12-29 11:58:43 +01:00
Jon Surrell
9d80017308
Mark db handler add method as static
2016-12-29 11:58:42 +01:00
Jon Surrell
c945d727d5
Add log flushing to db 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
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
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