-
Notifications
You must be signed in to change notification settings - Fork 587
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
MSBuildHelper: can't add a logger (/logger) #1712
Comments
As we have already discussed I'd like the msbuild module to be reworked :P. A nice side effect would be that this particular feature would be easy to add. And we could have convenience high order functions to add a particular logger to the arguments... |
If I were to consider PRing this... I'd add two properties, Would you agree? |
@0x53A Maybe/probably, I'd have to see in the PR the exact changes :) |
From our codebase (FAKE 4 for now): let setBinLog (path: string) (p: MSBuildParams): MSBuildParams =
// The current version of FAKE doesn't support binlog, so we "add" it by exploiting the fact that Properties aren't escaped
// "AdditionalProperties" is just a convenient one, we could use any property :)
let props = p.Properties |> Map.ofList
let additional = defaultArg (props |> Map.tryFind "AdditionalProperties") ""
let hackedUpAdditional = sprintf "%s\" \"/bl:%s" additional path
let hackedUpProps = props |> Map.add "AdditionalProperties" hackedUpAdditional |> Map.toList
{ p with Properties = hackedUpProps } ... |
Relevant for #2096 (comment) |
I need to add the StructuredLogger to my build.
From the readme, I need to emit a cmdline like this:
Currently I hacked it like this:
But it would obviously be preferrable if I didn't have to hack the global state.
There is
FileLoggers
with emits/fl
andDistributedLoggers
, which emits/dl
, but there seems to be nothing that emits/logger
.This could be solved either by adding an explicit property
Loggers
, or by just adding a string listAdditionalArguments
.Thoughts?
The text was updated successfully, but these errors were encountered: