[erlang-questions] Do I need sasl to log crashes in the gen_server init function ?

Ahmed Omar spawn.think@REDACTED
Thu Dec 16 14:24:12 CET 2010


Another way to see the actual exception in shell , is to start your
gen_server directly from there.
But in production, you will probably start it the proper way under a
supervision tree, and using the application controller so you better have
sasl running.

2> application:start(myapp).
{error,{shutdown,{myapp_app,start,[normal,[]]}}}
3>
=INFO REPORT==== 16-Dec-2010::14:21:55 ===
    application: myapp
    exited: {shutdown,{myapp_app,start,[normal,[]]}}
    type: temporary

3> test:start_link().
** exception exit: {badmatch,false}
     in function  test:init/1
     in call from gen_server:init_it/6
     in call from proc_lib:init_p_do_apply/3


On Thu, Dec 16, 2010 at 2:06 PM, David Almroth
<david.almroth@REDACTED>wrote:

> Ok.
>
> And thank you for the warning. My states are very small, so there is no
> danger.
>
>
> /David
> +46 - 70 - 417 46 10
> Skype: david.almroth
>
>
>
> 2010/12/16 Max Lapshin <max.lapshin@REDACTED>
>
> > On Thu, Dec 16, 2010 at 3:28 PM, David Almroth
> > <david.almroth@REDACTED> wrote:
> > > And if sasl is the only solution, should I use it in my production
> > > environment?
> > > Is there any arguments against using sasl in a production environment?
> >
> > You should use it.
> > The only thing I want to add that if you have gen_servers with really
> > large state, default logger may kill your system.
> >
>



-- 
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>


More information about the erlang-questions mailing list