Couchbase.log_level doesn't work

Hi, based on this documentation https://developer.couchbase.com/documentation/server/current/sdk/php/collecting-information-and-logging.html I set directive couchbase.log_level = DEBUG. Rest of settings (error_log = syslog + catch_workers_output = yes for every defined pool) is already in place and all logs are also forwarded to syslog. But there is no log entry related to Couchbase.

Please advice

Does it work in CLI mode?

No. For better imagination giving you result of php5-cli testCouchbase.php:

Fatal error: Uncaught exception 'CouchbaseException' with message 'The key does not exist on the server' in [CouchbaseNative]/CouchbaseBucket.class.php on line 196

CouchbaseException: The key does not exist on the server in [CouchbaseNative]/CouchbaseBucket.class.php on line 196

Call Stack:
    0.0001    1061600   1. {main}() /home/user/testCouchbase.php:0
    0.0036    1067768   2. CouchbaseBucket->get() /home/user/testCouchbase.php:7
    0.0036    1068160   3. _CouchbaseBucket->get() [CouchbaseNative]/CouchbaseBucket.class.php:196

Could you show the testCouchbase.php source?

I made this hello code only just for you in order to have some output example. Therefore mentioned key doesn’t exist at time of executing. When existing key is provided it returns value.

<?php
$cluster = new CouchbaseCluster('http://x.x.x.x:8091');
$bucket = $cluster->openBucket('test-bucket');
$result = $bucket->get('b0fbc1aff62787f6dd8aa45db3e5f956');
print 'Value: ' . $result->value;

I expect much more details when DEBUG is enabled. Step by step what extension exactly does.

your expectation are correct, could you check the settings from the script itself?

printf("couchbase.log_level = %s\n", ini_get('couchbase.log_level'));
printf("error_log = %s\n", ini_get('error_log'));
php > printf("couchbase.log_level = %s\n", ini_get('couchbase.log_level'));
couchbase.log_level = 
php > printf("error_log = %s\n", ini_get('error_log'));
error_log = syslog


cat /etc/php5/fpm/conf.d/couchbase.ini 
extension=couchbase.so
couchbase.log_level = DEBUG

Doesn’t matter if couchbase.log_level is managed by php.ini or inside extension ini. Result is same.

are you sure your script is loading this file? could you insert those lines into script and execute it under FPM?

If not how can I retrieve information (CouchbaseException) about fact that key doesn’t exist on server side in defined namespace? Will do…

Are you using PHP from some OS distribution? Or how you install and configure it?

Do you mean like analyze error code of the exception?

php 5.3.10 from Ubuntu 12.04.5 LTS repositories.

It’s really pain. PHP provide different output when request goes through HTTP or directly from CLI. Your command give me: couchbase.log_level = error_log = /usr/syslog. But error_log destination is non sense because all errors goes to syslog correctly. Therefore from my view is that this output is not correct. CLI output is correct and php -i as well. I made simple script with zero division error and all traces are in syslog.

But couchbase.log_level is not possible to define. I tried php.ini, also directly inside fpm pool, like php_admin_value[couchbase.log_level] = DEBUG.

Any other idea?

Actually we do not test and support PHP 5.3, could you at least check on PHP 5.4?