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

Customize SASL error_logger file opening modes #713

Closed
wants to merge 1 commit into from
Closed

Customize SASL error_logger file opening modes #713

wants to merge 1 commit into from

Conversation

saleyn
Copy link
Contributor

@saleyn saleyn commented May 11, 2015

Include the ability to open a SASL error log file in append mode
at startup vs currently implemented "rewrite-always" mode.

Note: this is a replacement of pull request #628, which is rebased on master.

@saleyn
Copy link
Contributor Author

saleyn commented May 11, 2015

Looking into why the test case is failing on the master branch

@OTP-Maintainer
Copy link

Patch has passed first testings and has been assigned to be reviewed


I am a script, I am not human


@bjorng
Copy link
Contributor

bjorng commented May 13, 2015

The first problem with the log_file test case is that log_file/1 is not exported. But then there remains at least one more problem.

@saleyn
Copy link
Contributor Author

saleyn commented May 27, 2015

I fixed the export, but I have a little problem figuring out how to force sasl application at startup not to overwrite the sasl_error_logger environment variable, which I set in the test case:

    SaslEnv = application:get_all_env(sasl),
    lists:foreach(fun({E,_V}) -> application:unset_env(sasl,E) end, SaslEnv),

    ok = application:set_env(sasl,sasl_error_logger,{file, File}),
    ok = application:start(sasl),

The problem is that sasl application has a {env, [...]} clause in its app file, which wipes out and ignores my test setting causing the test to fail. Any ideas how to force the variable to persist through sasl restart?


This problem was addressed on the mailing list using application:set_env/4 passing [{persistent, true}]

@OTP-Maintainer
Copy link

Patch has passed first testings and has been assigned to be reviewed


I am a script, I am not human


Include the ability to open a SASL error log file in append mode
at startup vs currently implemented "rewrite-always" mode.
@saleyn
Copy link
Contributor Author

saleyn commented May 27, 2015

The problems have been fixed.

@bjorng
Copy link
Contributor

bjorng commented May 28, 2015

Thanks! We will test the branch in our daily builds.

@OTP-Maintainer
Copy link

Patch has passed first testings and has been assigned to be reviewed


I am a script, I am not human


@bjorng
Copy link
Contributor

bjorng commented May 29, 2015

Merged.

@bjorng bjorng closed this May 29, 2015
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.

3 participants