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

log_prefix cannot contain parantheses #31

Closed
dtecta opened this issue Jul 30, 2015 · 4 comments
Closed

log_prefix cannot contain parantheses #31

dtecta opened this issue Jul 30, 2015 · 4 comments

Comments

@dtecta
Copy link

dtecta commented Jul 30, 2015

In

auto logger = g3::LogWorker::createWithDefaultLogger(argv[0], myDir);

creation fails if argv[0] contains parentheses, for example as in

"C:/Program Files (x86)/InstallDir/myApp.exe"

I currently do not have a fix. I work around this problem by not using argv[0] as prefix.

@KjellKod
Copy link
Owner

Thanks.

What's the error message when it exits?

@dtecta
Copy link
Author

dtecta commented Jul 30, 2015

Program aborts before closing the log. The abort() is in filesink.cpp, line 25. Parentheses () are listed as illegal characters in filesinkhelper.ipp, line 27. I'm not sure about other OSes but parentheses are legal filename-characters under Windows.

@KjellKod
Copy link
Owner

It can certainly be removed from the illegal characters. '(' and ')' can be used both on Windows and Linux. In general I think it is a bad habit to use these characters for file entity names since they have to be "escaped" when accessing them but yes, they are legal.

You can either do a pull request or wait for me to get to fix it. The fastest option is to do a pull request since I'm heads down with other work so I won't get to it myself for a few weeks.

@KjellKod
Copy link
Owner

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

No branches or pull requests

2 participants