Skip to content
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 logging in run1 stage #56

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

gomoripeti
Copy link
Contributor

(candidate for smallest PR price)

In startup stage run1 the log level is not yet initialized (because it
depends on the arguments) therefore it is not possible to emit an error
log. In case of some issue with argument parsing write instead to
console directly.

This eliminates the below error:

exited: {bad_return,
            {{epl_app,start,[normal,[]]},
             {'EXIT',
                 {badarg,
                     [{ets,lookup,[epl_priv,log_level],[]},
                      {epl,lookup,1,[{file,"src/epl.erl"},{line,27}]},
                      {epl,log,3,[{file,"src/epl.erl"},{line,63}]},
                      {epl_app,run1,0,
                          [{file,"src/epl_app.erl"},{line,91}]},
                      {epl_app,start,2,
                          [{file,"src/epl_app.erl"},{line,22}]},
                      {application_master,start_it_old,4,
                          [{file,"application_master.erl"},
                           {line,273}]}]}}}}

In startup stage run1 the log level is not yet initialized (because it
depends on the arguments) therefore it is not possible to emmit an error
log. In case of some issue with argument parsing write instead to
console directly.

This eliminates the below error:

    exited: {bad_return,
                {{epl_app,start,[normal,[]]},
                 {'EXIT',
                     {badarg,
                         [{ets,lookup,[epl_priv,log_level],[]},
                          {epl,lookup,1,[{file,"src/epl.erl"},{line,27}]},
                          {epl,log,3,[{file,"src/epl.erl"},{line,63}]},
                          {epl_app,run1,0,
                              [{file,"src/epl_app.erl"},{line,91}]},
                          {epl_app,start,2,
                              [{file,"src/epl_app.erl"},{line,22}]},
                          {application_master,start_it_old,4,
                              [{file,"application_master.erl"},
                               {line,273}]}]}}}}
@michalslaski michalslaski merged commit b170d47 into erlanglab:master Jun 20, 2017
@michalslaski
Copy link
Member

Thanks @gomoripeti !

@baransu baransu added this to the 0.7 milestone Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants