-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix logfile path #42
Comments
Yes, that's the problem! If we fix that only in the electron_bundler branch, it will probably be overwritten by a merge with master, but we can't do electron specific stuff in master. I think this is a bug in electron for iOS, as a filename without path should use relative path which is the installation directory. |
Is there something like electron compile switches we could use? |
I've not found anything on What I would do:
|
Maybe |
@jorgerobles Isn't that a bit overcomplicated? There must be a simpler solution. |
Ok, found something to get if app is running inside electron: |
Well is complicated but abstracts enough to update server freely. Proces.. is of course valid |
You can also use is-electron to detect if current process is running in Electron. |
Thank's @cheton! That's even better. |
@jorgerobles |
Probably is working but saving somwhere else :)
El 6 jul. 2017 6:29 p. m., "Claudio Prezzi" <[email protected]>
escribió:
… @jorgerobles <https://github.com/jorgerobles> logFile =
fs.createWriteStream(path.join(electronApp.getPath('
userData'),"logfile.log")); doesn't seem to work on Win10 electron app. I
get now error message, but also no logfile.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABoIYP-3gt0um35LD0tLdw91MzGd8k96ks5sLQtogaJpZM4OPgoR>
.
|
Nope, doesn't seem to. I searched the whole drive. |
If(Mac) warn("update to an OS with sane APIs") |
Ok, found that getPath('userData') is delivering the correct path with \ as directory separator on Windows. Still searching why fs.createWriteStream is not working... |
I had to make if OS dependant with Who could compile the Mac Version and test if the logfile is written now? (needs .env file with LOG_LEVEL=3 in installation folder). |
I'll do
El 7 jul. 2017 12:19, "Claudio Prezzi" <[email protected]> escribió:
… I had to make if OS dependant with os.platform.
Who could compile the Mac Version and test if the logfile is written now?
(needs .env file with LOG_LEVEL=3 in installation folder).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABoIYL3GcF_ualTSQitMuGgWWEilfPIDks5sLgYigaJpZM4OPgoR>
.
|
@cprezzi cannot get it work on Sierra. Does not find .env |
I don't know anything about Mac. On Windows, the .env file just has to sit in the same directory as the exe. |
Yes. I've tried several ways. Seems version bound. On Mavericks ran ok yesterday. |
Eventually making a .provile file could help: https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x |
Yes, I did the |
Did I mention - I hate Apple?! |
Hmm. Osx could contribute, but I see more culprit on electron or dotenv. I
don't miss win viruses.
El 7 jul. 2017 6:10 p. m., "Claudio Prezzi" <[email protected]>
escribió:
… Did I say - I hate Apple?!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABoIYIJ0ZeqA4ehBLXsHKkHfu2laWlIVks5sLlhmgaJpZM4OPgoR>
.
|
Osx is a God gift. :) |
I once gave a MBP 3 months of my development life. I liked the hardware so was willing to give the OS a fair shot. Things kept getting worse over time as I learned more and more of it. It's both a bad UI (very horrid keyboard support, way too much clicky needed) and a bad POSIX system (ancient BSD version missing critical syscalls needed to avoid deadlock in fork/exec). |
This is how I got the Logfile.txt working on OSX: Open a Terminal session (from the Utilities folder under Applications) And as it runs it creates Logfile.txt in that same directory. Cheers |
@DouglasPearless Thank you for the information. That makes sense. Setting the environment variable with export only survives in the same terminal session. |
As LaserWeb/LaserWeb4#369 @gerwinbrunner
@cprezzi I've tested patch on
electron_bundler
At https://github.com/LaserWeb/lw.comm-server/blob/electron_bundler/server.js#L2843
logFile = fs.createWriteStream(path.join(electronApp.getPath('userData'),"logfile.log"));
I've no commited this, as don't know if thas to be other considerations about branches master & electron
The text was updated successfully, but these errors were encountered: