anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
457 stars 53 forks source link

Don't write log messages to stdout #3159

Closed lukaszcz closed 2 weeks ago

lukaszcz commented 2 weeks ago

The "Cloning (...)" message was written to stdout which messed up markdown generation.

paulcadman commented 2 weeks ago

I think we should have logs for when things are being cloned in the normal use-case. Perhaps we could configure the output based on the current log level instead to cover use cases where you don't want them printed?

lukaszcz commented 2 weeks ago

I can turn back git messages. They go to stderr, so it's not really a problem. The main thing is redirecting the log function to use stderr instead of stdout.

The problem for markdown generation is that the log goes to stdout. Do you have a reason to write it to stdout?

janmasrovira commented 2 weeks ago

Ideally we would redirect the git messages to the Logger effect, probably on log level info or progress

lukaszcz commented 2 weeks ago

But do we need the logger effect to then write it to stdout? If I just change this to stderr, this will already solve the markdown generation problem.

janmasrovira commented 2 weeks ago

I mentioned the Logger effect, which prints to stderr, so that it integrates well with the existing cli flags

lukaszcz commented 2 weeks ago

Juvix.Data.Effect.Log writes to stdout, unless there is some other logger effect. Actually, I didn't change it, I only changed to stderr for the buffering

lukaszcz commented 2 weeks ago

Changed to stderr now

lukaszcz commented 2 weeks ago

Ah, okay, there is also Juvix.Data.Logger. Maybe we should remove Juvix.Data.Effect.Log then?