haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Logging licence #256

Closed Alxandr closed 6 years ago

Alxandr commented 6 years ago

The logary facade is pretty great, cause it adds no new dependencies to the project. However, given the new licence of logary itself (which as far as I know is the only way to do much with the logs), you are no longer able to use logary in combination with

any/all Microsoft web stacks

This. As far as I interpret it (though, I'm in no way a lawyer), means I would not be able to test anything that uses the microsoft webstack, while at the same time doing anything with the log output (which requires more orchestration than the facade provides). This means, users are either going to have to stay on an old version of Logary (and receive no updates), or write their own connectors to the facade that takes the logs somewhere else. Is it maybe time to start thinking about changing the logging solution?

AnthonyLloyd commented 6 years ago

The logary facade we use is OSS but it may not be updated going forward. The timing is fine for us as we have a few issues related to console output that mean its sensible to go our own way. I've had a look at these and what we can do and I think we can cover them while at the same time simplify logging. I propose:

I think this covers most issues.

I'm starting on these this evening. Any help very welcome.

haf commented 6 years ago

@Alxandr Expecto uses the Apache 2.0 licenced Logary Facade, and will continue doing so. I don't see where you are coming from? Also, why wouldn't it be maintained? You're here asking about it and it's Apache 2.0 licensed, is it not?

The whole point of this Facade is to abstract away from the logging framework, so that this is doesn't cause issues to people. If you just implement the Logger interface you can do what you want with it. As such there's absolutely no requirement to pay me for anything unless you want to support me, and it will continue to be like that going forward.

Furthermore, by abandoning it, you're really just forking an already Apache 2.0 licensed piece of code and now you have a thing that you can't even adapt with off-the-shelf software: that said; what outputs are you using? I've yet to meet anyone using anything but stdout/teamcity?

Finally, Logary is not incompatible with anything, it's just commercial for commercial things.

@AnthonyLloyd I've branched v3 https://github.com/logary/logary/tree/facade/v3 — Expecto will continue to adhere to the Facade logging API, so that is stable and can be replaced at runtime with the dynamic proxy.

This is primarily the Logger interface and the Global module though; logger implementations are free to change however they want. The best way to go forward is to continue working like we've done so far, still with the same licenses.

Improvements will be backported to Logary's main repo (linked above for the Facade) so that all F# open source projects can benefit.

Would you like me to port the tests into that branch, too?

haf commented 6 years ago

make logging async by storing and writing once complete

Like https://github.com/haf/expecto/issues/190 ? A span per test?

EDIT: correcting link to #190

AnthonyLloyd commented 6 years ago

Yes, or for the whole output. Possibly only output if there is an error otherwise just continue with the progress indicator.

Alxandr commented 6 years ago

Well, as long as I can connect to another logging system using Expecto.Logging.Global.initialise I guess it's fine. I was under the impression that if you wanted to "route" events anywhere but the console, you'd have to connect it to Logary (using the facade adapter).

haf commented 6 years ago

@Alxandr I think you're not alone in getting that idea seeing the response I've been getting. Thank you for explaining how you were thinking. I'm going to make that more clear.