Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
memcache
Commits
dab8e892
Commit
dab8e892
authored
Apr 18, 2013
by
markpavlitski
Committed by
Jeremy
Apr 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1830496
by markpavlitski: log connect errors in watchdog.
parent
a878c955
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
dmemcache.inc
dmemcache.inc
+3
-9
No files found.
dmemcache.inc
View file @
dab8e892
...
@@ -411,16 +411,10 @@ function dmemcache_object($bin = NULL, $flush = FALSE) {
...
@@ -411,16 +411,10 @@ function dmemcache_object($bin = NULL, $flush = FALSE) {
}
}
if
(
!
$init
)
{
if
(
!
$init
)
{
// Ensure we use an available t() function.
$t
=
get_t
();
$error_msg
=
$t
(
'Failed to connect to memcache server: %server'
,
array
(
'%server'
=>
$s
)
);
// We can't use watchdog because this happens in a bootstrap phase
// We can't use watchdog because this happens in a bootstrap phase
// where watchdog is non-functional.
Thus use trigger_error() to
// where watchdog is non-functional.
Register a shutdown handler
//
start drupal_error_handler()
.
//
instead so it gets recorded at the end of page load
.
trigger_error
(
$error_msg
,
E_USER
_ERROR
);
register_shutdown_function
(
'watchdog'
,
'memcache'
,
'Failed to connect to memcache server: !server'
,
array
(
'!server'
=>
$s
),
WATCHDOG
_ERROR
);
$failed_connection_cache
[
$s
]
=
FALSE
;
$failed_connection_cache
[
$s
]
=
FALSE
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment