Closed ricarkol closed 6 years ago
On Wednesday, 01.03.2017 at 07:29, Ricardo Koller wrote:
solo5 is not respecting the
--logs
argument tomirage configure
and we end up with a lot of output on stdout that's not always useful for an app developer (specially if you want to pipe the output to something else). Ideally all of the following should be avoided if mirage is configured with--logs=error
.
I don't think this can easily be integrated with the mirage tool, but I would do at least the following:
1) Replace all Solo5-internal calls to printf(...) with, say, log(important, ...). Add a "static int log_verbose = 0", and only have log() print if "log_verbose || important" is true.
2) Implement some way to toggle log_verbose at runtime w/o recompilation. This is annoying, since we currently pass all of the command line to solo5_app_main(). One way would be to look for a "solo5:verbose" token at the start, if present then eat it and set verbose.
So, the default would be "silence", which is fine, and if the user runs into issues then they'd be asked to pass "solo5:verbose" on the command line.
What do you think?
-mato
Hi mato, I think that works. Will work on a PR for solo5.
Do you think the logs coming from ocaml-freestanding could be removed? these:
STUB: getenv() called
STUB: open() called
STUB: getpid() called
STUB: getppid() called
"STUB:" + xxx + "called"
On Thursday, 02.03.2017 at 20:34, Ricardo Koller wrote:
Hi mato, I think that works. Will work on a PR for solo5.
Do you think the logs coming from ocaml-freestanding could be removed? these:
STUB: getenv() called STUB: open() called STUB: getpid() called STUB: getppid() called "STUB:" + xxx + "called"
Yeah, I can kill those.
Scope as defined in https://github.com/Solo5/solo5/issues/161#issuecomment-283792229 is done, so closing.
solo5
is not respecting the--logs
argument tomirage configure
and we end up with a lot of output on stdout that's not always useful for an app developer (specially if you want to pipe the actual app output to something else). Ideally all of the following should be avoided if mirage is configured with--logs=error
.These logs are coming from
solo5
,mirage-solo5
("new bindings"), andocaml-freestanding
("STUB:").