igorklopov / enclose

Compile your Node.js project into an executable
http://enclosejs.com
Other
936 stars 43 forks source link

not working with log4js-node #43

Closed mylady closed 9 years ago

mylady commented 9 years ago

hi, i use log4js to log some info and whichever log file path i fill in the config file it always cause a ENOENT error,the result path is append /thebox prefix. is it a bug or i made some stupid mistake?

getmeaway commented 9 years ago

I have a problem with log4js too. The exe file crashes when i try to write logs on file. If i write logs on console it works fine

mylady commented 9 years ago

@getmeaway maybe your problem is something with path, for file out the executale you should use process.cwd()

igorklopov commented 9 years ago

No. This is not your problem. The fix will come in next version

mylady commented 9 years ago

@getmeaway sorry,i checked process.cwd() when i move the executable to another directory and it remains the same as compile path

mylady commented 9 years ago

@igorklopov THIS IS very weird! if i run the executable directly in the project folder,it's working and write log to file if i mkdir dist(in the project folder) and copy the executable and node_modules into that folder,it will report an error that log4js.appender.dateFile module not found but repeat the same procedure into a folder outside project,it's working again

igorklopov commented 9 years ago

Please leave this problem for a while because it is a BUG in enclose. I will fix it very soon. Thx

mylady commented 9 years ago

@igorklopov ok i got a workaround to modified log4js directly require the appenders i use,now it's working fine:)

igorklopov commented 9 years ago

:thumbsup: good workaround

igorklopov commented 9 years ago

Now fixed in 0.2.30. Please try again. No workaroud needed anymore.

mylady commented 9 years ago

it's working great thx man!