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

Use Logging.warn to output warning messages #728

Merged
merged 2 commits into from
Aug 18, 2020
Merged

Conversation

gregod
Copy link
Contributor

@gregod gregod commented Aug 17, 2020

Using println for the warning messages in src/file.jl outputs directly to stdout. This creates issues when using a julia script in an unix pipe writing data to stdout.

This pull request replaces these calls with the warn method from the stdlib logging framework. They correctly attach to stderr instead, preventing the mix of messages and data.

@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #728 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #728   +/-   ##
=======================================
  Coverage   84.75%   84.75%           
=======================================
  Files          10       10           
  Lines        1850     1850           
=======================================
  Hits         1568     1568           
  Misses        282      282           
Impacted Files Coverage Δ
src/file.jl 94.70% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7bc714...22eb42f. Read the comment docs.

Logging dependency is not needed for the simple warn macro
@quinnj
Copy link
Member

quinnj commented Aug 18, 2020

@oxinabox, @bkamins, does this look good to you two? (or anyone else have an opinion here?). Seems fine to me.

Copy link

@oxinabox oxinabox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a good idea.
Also using @warn makes it possible to use the rest of the logging infastructure to mute it, etc

@quinnj quinnj merged commit 6a69434 into JuliaData:master Aug 18, 2020
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

4 participants