HelloWorld-PHP icon indicating copy to clipboard operation
HelloWorld-PHP copied to clipboard

No logs in log-directory using setLogLocation()

Open esmithud opened this issue 5 years ago • 1 comments

I'm using PHP SDK and this HelloWorld example. I've set the log location with $dataService->setLogLocation("path/to/my/log/dir") but I'm not seeing any logs. I am also calling $dataService->enableLog() to make sure that logging is enabled. I've made sure the the directory has the correct permissions and even 777'd it and still no luck. The only way I've been able to get this to work is by hacking the core file at v3-php-sdk\src\Core\CoreConstants.php and changing const DEFAULT_LOGGINGLOCATION = "/tmp/IdsLogs"; to my log location. That obviously won't be acceptable on a production environment. Am I missing something here?

esmithud avatar Jul 12 '19 13:07 esmithud

So I did figure out that setting the following properties directly does work: $serviceContext = $dataService->getServiceContext(); $serviceContext->IppConfiguration->Logger->RequestLog->EnableRequestResponseLogging = true; $serviceContext->IppConfiguration->Logger->RequestLog->ServiceRequestLoggingLocation = "/path/to/dir"; So there seems to be an issue with setLogLocation() somewhere in the mess.

esmithud avatar Jul 12 '19 14:07 esmithud