-
Notifications
You must be signed in to change notification settings - Fork 585
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
Add traceImportant and traceError with formats #1986
Conversation
I think this module has a particular nasty naming. Nobody knows what the difference between |
What is the difference lol |
src/app/Fake.Core.Trace/Trace.fs
Outdated
let traceErrorfn fmt = Printf.ksprintf traceError fmt | ||
|
||
/// Writes an error message to stderr (in red) and without a line break | ||
let traceErrorf fmt = Printf.ksprintf (fun text -> CoreTracing.postMessage (TraceData.ErrorMessage(text))) fmt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think we need to leave out the f
variants as they shouldn't print a newline character. I think your implementation will
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the method from other f variants...happy to remove them though, I don't get the use case of the f methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the , false
parameter - which doesn't exist for those types for some reason.
I don't get the use case of the f methods
One use case is to realise some prompt to the user like
Please enter value for X: |
and have the cursor sitting at |
instead of the next line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh now it makes perfect sense!
I can't think why someone would need important or error version anyways then. So I'll remove.
Maybe we could obsolete traceFAKE stating to use traceimportantfn ? |
have to look it up every time. Some go to stderr and some to stdout and different colors. |
Ahh right |
@matthid is this ok to make it in now? |
Yes, thanks! |
trace and log already have these, but important and error do not.