$res = $this->_fgets( $sock );
if ( $this->_debug ) {
- $this->_debugprint( sprintf( "MemCache: delete %s (%s)\n", $key, $res ) );
+ $this->_debugprint( sprintf( "MemCache: delete %s (%s)", $key, $res ) );
}
if ( $res == "DELETED" || $res == "NOT_FOUND" ) {
public function get( $key, &$casToken = null ) {
if ( $this->_debug ) {
- $this->_debugprint( "get($key)\n" );
+ $this->_debugprint( "get($key)" );
}
if ( !is_array( $key ) && strval( $key ) === '' ) {
if ( $this->_debug ) {
foreach ( $val as $k => $v ) {
- $this->_debugprint( sprintf( "MemCache: sock %s got %s\n", serialize( $sock ), $k ) );
+ $this->_debugprint( sprintf( "MemCache: sock %s got %s", serialize( $sock ), $k ) );
}
}
if ( $this->_debug ) {
foreach ( $val as $k => $v ) {
- $this->_debugprint( sprintf( "MemCache: got %s\n", $k ) );
+ $this->_debugprint( sprintf( "MemCache: got %s", $k ) );
}
}
MediaWiki\restoreWarnings();
}
if ( !$sock ) {
- $this->_error_log( "Error connecting to $host: $errstr\n" );
+ $this->_error_log( "Error connecting to $host: $errstr" );
$this->_dead_host( $host );
return false;
}
$val = serialize( $val );
$flags |= self::SERIALIZED;
if ( $this->_debug ) {
- $this->_debugprint( sprintf( "client: serializing data as it is not scalar\n" ) );
+ $this->_debugprint( sprintf( "client: serializing data as it is not scalar" ) );
}
}
if ( $c_len < $len * ( 1 - self::COMPRESSION_SAVINGS ) ) {
if ( $this->_debug ) {
- $this->_debugprint( sprintf( "client: compressing data; was %d bytes is now %d bytes\n", $len, $c_len ) );
+ $this->_debugprint( sprintf( "client: compressing data; was %d bytes is now %d bytes", $len, $c_len ) );
}
$val = $c_val;
$len = $c_len;
$line = $this->_fgets( $sock );
if ( $this->_debug ) {
- $this->_debugprint( sprintf( "%s %s (%s)\n", $cmd, $key, $line ) );
+ $this->_debugprint( sprintf( "%s %s (%s)", $cmd, $key, $line ) );
}
if ( $line == "STORED" ) {
return true;
}
}
$msg = str_replace( '$1', $peer, $msg );
- $this->_error_log( "$msg\n" );
+ $this->_error_log( "$msg" );
$this->_dead_sock( $sock );
}