Comments (12)
We haven't met this problem, though we call application:stop(log4erl) as part of our normal application shutdown (which happens many time per day, as per our integration tests).
Using: log4erl master, file and console appenders + one custom appender.
Running on: R13B01, ERTS 5.7.2, Ubuntu Karmic.
from log4erl.
Hi maxlapshin,
I'm not sure I understand you complain here. Is this something you face a lot? Is there an error message you get for example? Can you please provide a sample code? I use log4erl a lot with different OSes (Solaris, linux, win) and don't recall a time when I faced such an issue.
from log4erl.
So, it seems, that I don't understand where to put application:stop(log4erl). =(
I call application:start(log4erl) in ems_app:start/2 callback and call application:stop(log4erl) in ems_app:stop/1 callback. Am I doing wrong?
from log4erl.
Yes, I've found: it is my fail, I shouldn't stop log4erl from stop/1 callback of main application.
from log4erl.
Hi maxlapshin,
That's what I normally do, call application:stop(log4erl) from my applications's stop function. Can you please explain what is the cause of failure in your side and how it was resolved?
Ahmed
from log4erl.
http://github.com/erlyvideo/erlyvideo/commit/bb69a955491e32f462985f6517d56bc12f3dce47
I had to move application:stop(log4erl) from ems_app.erl (application handler) to ems.erl (generic module) and hangs disappeared.
from log4erl.
Perfect. I will close this case now.
from log4erl.
And what is the problem? I have the same hang with my erlang-rtmp application/library
from log4erl.
Hi maxlapshin,
I reopened this case again. I'm not sure of the exact reason for the hangs but below you can find my analysis.
I've done a quick review for ems.erl, ems_app.erl and ems_log.erl and found out that you start log4erl and stop it in different modules. Also, I could see in some modules you stop and unload log4erl (ems.erl) and in other you just stop it (ems_log.erl). I suspect this is due to the issue of log4erl hanging.
I suggest you add application:start(log4erl) and application:stop(log4erl) in the same module only and delete the rest. Also, make sure you start before any other log4erl dependant code and stop after it. My initial guess is that this place is ems_log.erl, unless you're using log4erl logging before you actually initialize ems_log.erl module.
I don't normally use application:unload/1 but you may have your own reasoning for using it. If you opt to using it, I'd recommend you also add application:load/1 before application:start/1 just in case.
Please try it again and let me know if you still have problems.
Ahmed
from log4erl.
Yes, I will try of course, thank you for review.
from log4erl.
Closing
from log4erl.
Yes, close it, thank you again for help.
from log4erl.
Related Issues (11)
- debianizing HOT 1
- crash (gen_event handler) when logging string that includes tilde char (~) HOT 2
- syntax error on build
- Unexpected requests to disk HOT 1
- Compilation Failes HOT 2
- [DOC] Working sample for a syslog appender HOT 4
- can't clone mochiweb repository HOT 2
- User defined levels not written HOT 4
- i have some questions about performance HOT 2
- mochiweb branch/master is nolonger provided
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log4erl.