K2InformaticsGmbH / imem

Clustered in-memory database based on MNESIA with simple SQL layer
http://www.k2informatics.ch/
Apache License 2.0
21 stars 4 forks source link

lager backend - error when other applications are not started #239

Closed shamis closed 5 years ago

shamis commented 5 years ago

Log table name is fetched from ddConfig table and if the application is not started the fetch fails as it uses application:get_application/1.

https://github.com/K2InformaticsGmbH/imem/blob/6add108d6c086872f83c3c169210c73e789501d1/include/imem_config.hrl#L16-L22

Following error is produced when this happens.

17:42:13.381 [error] Lager event handler {imem_lager_backend,dderl} exited with reason {'EXIT',{badarg,[{dderl,log_table,0,[{file,"c:/vagrant/ubuntu/cpro/_build/default/lib/dderl/src/dderl.erl"},{line,217}]},{imem_lager_backend,handle_event,2,[{file,"c:/vagrant/ubuntu/cpro/_build/default/lib/imem/src/imem_lager_backend.erl"},{line,56}]},{gen_event,server_update,4,[{file,"gen_event.erl"},{line,573}]},{gen_event,server_notify,4,[{file,"gen_event.erl"},{line,555}]},{gen_event,handle_msg,6,[{file,"gen_event.erl"},{line,296}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,...}]}]}}