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

The C++ SDK is writing its log file to the wrong folder #78

Closed
stkrwork opened this issue Jul 13, 2021 · 2 comments · Fixed by #79
Closed

The C++ SDK is writing its log file to the wrong folder #78

stkrwork opened this issue Jul 13, 2021 · 2 comments · Fixed by #79

Comments

@stkrwork
Copy link
Contributor

stkrwork commented Jul 13, 2021

Describe the bug
The C++ SDK is writing its log file to the wrong folder. The log file is not in the folder specified, but next to the folder

To Reproduce
Steps to reproduce the behavior:

  1. Log a message with the log functionality of the C++ SDK
  2. Observe that the log file is not in the folder specified, but next to the folder

Expected behavior
the log file should be inside that folder not next to it.

Screenshots
Error

Desktop (please complete the following information):

  • C++ SDK

Fix idea
Either add a slash here or the config value LOG_FOLDER_KEY ("logFolder") needs to get a slash appended in the end

@dgkanatsios
Copy link
Contributor

thanks @stkrwork!
so @ravarnamsft did some investigation and the bug exists for process based servers. For process based servers we don't add the "/" at the end of the env variable whereas we add it on container based servers. In C# and Java GSDK we do use methods that concatenate folder and paths correctly (e.g. the Path.Combine method here

string fileName = Path.Combine(_logFolder, $"GSDK_output_{datePart}.txt");
), we could do the same for C++.

@stkrwork
Copy link
Contributor Author

this could be an option, to detect if it ends with a slash or not, and then add one to the end if needed before appending the file name

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

Successfully merging a pull request may close this issue.

2 participants