Index: trunk/php/wmerrors/wmerrors.c |
— | — | @@ -12,10 +12,11 @@ |
13 | 13 | #include "ext/standard/file.h" /* for file_globals aka. FG() */ |
14 | 14 | #include "ext/date/php_date.h" /* for php_format_date */ |
15 | 15 | #include "ext/standard/php_smart_str.h" /* for smart_str */ |
| 16 | +#include "ext/standard/php_string.h" /* for php_basename() */ |
16 | 17 | #include "ext/standard/html.h" /* for php_escape_html_entities */ |
17 | 18 | #include "Zend/zend_builtin_functions.h" /* for zend_fetch_debug_backtrace */ |
18 | 19 | |
19 | | -void wmerrors_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); |
| 20 | +static void wmerrors_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); |
20 | 21 | static void wmerrors_show_message(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args TSRMLS_DC); |
21 | 22 | static void wmerrors_get_concise_backtrace(smart_str *s TSRMLS_DC); |
22 | 23 | static void write_full_backtrace(php_stream *logfile_stream); |
— | — | @@ -117,9 +118,9 @@ |
118 | 119 | static const char* error_type_to_string(int type); |
119 | 120 | static void wmerrors_log_error(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args TSRMLS_DC); |
120 | 121 | |
121 | | -void wmerrors_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) |
| 122 | +static void wmerrors_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) |
122 | 123 | { |
123 | | - smart_str new_filename = {0}; |
| 124 | + smart_str new_filename = { NULL }; |
124 | 125 | TSRMLS_FETCH(); |
125 | 126 | |
126 | 127 | /* Do not call the custom error handling if: |
— | — | @@ -291,7 +292,7 @@ |
292 | 293 | /** |
293 | 294 | * Write a full backtrace to a stream |
294 | 295 | */ |
295 | | -void write_full_backtrace(php_stream *logfile_stream) { |
| 296 | +static void write_full_backtrace(php_stream *logfile_stream) { |
296 | 297 | zval *trace; |
297 | 298 | zend_fcall_info fci = empty_fcall_info; |
298 | 299 | zend_fcall_info_cache fcc = empty_fcall_info_cache; |
— | — | @@ -338,7 +339,7 @@ |
339 | 340 | long maxlen = PHP_STREAM_COPY_ALL; |
340 | 341 | char * tmp1, *tmp2; |
341 | 342 | int tmp1_len, tmp2_len; |
342 | | - smart_str expanded = {0}; |
| 343 | + smart_str expanded = { NULL }; |
343 | 344 | va_list my_args; |
344 | 345 | |
345 | 346 | /* Is there a sane message_file? */ |
Index: trunk/php/wmerrors/README |
— | — | @@ -36,14 +36,14 @@ |
37 | 37 | |
38 | 38 | The name of a file to send error reports to. This is similar to PHP's |
39 | 39 | error_log, except that it provides several additional features. Logging to |
40 | | - a TCP or UDP network socket is supported, using a URL of the form: |
| 40 | + a TCP or UDP network socket is also supported, using a URL of the form: |
41 | 41 | |
42 | 42 | udp://<host>:<port> |
43 | 43 | tcp://<host>:<port> |
44 | 44 | |
45 | 45 | For example: |
46 | 46 | |
47 | | - udp://logger:8420 |
| 47 | + udp://logger.example.com:8420 |
48 | 48 | |
49 | 49 | wmerrors.log_backtrace |
50 | 50 | |