Skip to content

Conversation

@c42f
Copy link
Member

@c42f c42f commented Dec 22, 2017

Some cleanup mostly to address problems @stevengj found over at 5d77d1b#r26334167

I also added some license headers which I realized were forgotten from the original PR.

Potentially replaces #25229

c42f added 3 commits December 22, 2017 10:07
* Temporariliy reinstate redirection for Base.display_error().  Uses of
  this (via logging(..., kind=:error)) will get a depwarn via the
  logging() function.
* Move tests of deprecated functionality to deprecation_exec, so that
  they'll be executed without --depwarn=error
@c42f c42f mentioned this pull request Dec 22, 2017
15 tasks
@ararslan ararslan added the logging The logging framework label Dec 22, 2017
@StefanKarpinski
Copy link
Member

This is passing tests so feel free to merge when you feel it's ready!

if !isempty(st)
io = redirect(io, log_error_to, st[1])
end
end
Copy link
Member Author

Choose a reason for hiding this comment

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

@stevengj by the way, here's an answer to your question about log_error_to - for the moment I've reinstated it exactly as it was used inside display_error. I think it was a bit of a misfeature if used to capture REPL errors, but it's easy to preserve the behavior for now.

Copy link
Member

Choose a reason for hiding this comment

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

The point is, this will get removed when the deprecation is removed in 1.0, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. The user should get a depwarn if they ever manage to populate log_error_to.

@c42f c42f merged commit eec85b2 into JuliaLang:master Dec 22, 2017
@c42f c42f deleted the logging-cleanups branch December 22, 2017 21:41
@c42f
Copy link
Member Author

c42f commented Dec 22, 2017

Cheers! This was a relatively minor cleanup so I went ahead and merged it without further ado.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logging The logging framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants