-
Notifications
You must be signed in to change notification settings - Fork 62
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
Logger fails to create log file when channel name includes forward slash #214
Comments
Previously when we couldn't create a file we'd report Logger error: Os { code: 2, kind: NotFound, message: "No such file or directory" } Now Logger error: Couldn't open file "<file path>": No such file or directory (os error 2) (#214)
@Kabouik thanks again for reporting this. Please let me know if you encounter any other problems. |
Thanks for the quick fix. This solved the issue on my computer, but for some reason the issue persists on my SailfishOS device. |
@Kabouik what exactly does the error message say? I updated the error logging today so you should see a more detailed error message that also show the problematic file path. |
Actually that is what surprised me, I should have said that in my first message: the error is the same as the one posted here, which is why I double checked the version to make sure it included your fix. That's also why I believe the issue may be on my end only. |
It seems like you need to recompile and reinstall tiny. Make sure |
It does. |
What does the error message say exactly? |
|
That can't be the actual message. If you paste the actual message I'll try to help. |
I had something else in my clipboard on the device I didn't want to lose, so I just typed it and did not notice the two small typos (sorry): Of note, as opposed to the initial issue, the message appears only once even if I leave |
Previously we would report this in "mentions" tab: Can't create logger: No such file or directory (os error 2) With this patch: Could not create log directory "/home/omer/no/such/dir": No such file or directory (os error 2) Not sure about the wording, but showing the path in the error message is helpful to realize the typos or when a user reports the error to issue tracker. (#214)
@Kabouik thanks.. so the problem is logger can't create the log directory. I slightly improved the error message in b7dfd9c so you'll now see the path it failed to create. I think the most common reason for this is you have |
Yeah, I think using |
OK, done. |
I am sorry to say that I realized now (thanks to the improved error message in b7dfd9c) that the issue on the SailfishOS device was probably due to me synchronizing the config file between the two devices after the forward slash fix. I didn't notice that the path to the log files was written in the form of |
No worries -- as you say these improvements will be helpful to others. They could've even helped you by showing the full path as you'd realize the mistake there. Btw, we have a WIP PR #171 to support |
Uh, the master version doesn't have that already? Because that's what I have put in my
Is that really what #171 is about? By the way I think #171 is a good idea, I'm not a big fan of having passwords written in plain text files, and reading env variables would allow conveying the password from |
You're right, confirmed! With But then if |
This would work if you make sure you run tiny in |
I see. I ran |
@Kabouik reports in #211
In other words when the channel name contains
/
logger fails to create the logfile and reports this in "mentions" tab:
Two TODOs:
/
s in them (as far as I can see RFC 2812 allows this)The text was updated successfully, but these errors were encountered: