Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No logs in log-directory using setLogLocation() #6

Open
esmithud opened this issue Jul 12, 2019 · 1 comment
Open

No logs in log-directory using setLogLocation() #6

esmithud opened this issue Jul 12, 2019 · 1 comment

Comments

@esmithud
Copy link

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant