davidfowl / Micronetes

Micronetes is a local orchestrator inspired by kubernetes that makes developing and testing microservices and distributed applications easier.
MIT License
773 stars 46 forks source link

Implement the ability to write the console output of processes into a file #42

Closed nj0yeh closed 4 years ago

nj0yeh commented 4 years ago

Implement the ability to write the console output of processes into a file

Usage: Add path to .yaml file in parameter consoleLogDestinationPath. Can contain environment variables.

The same file can be reused for multiple processes.

davidfowl commented 4 years ago

Why do I want this?

sheryever commented 4 years ago

Powershell can write the output in file

nj0yeh commented 4 years ago

To start processes via bash and parse the logs to determine the correct times to trigger something (e. g. a call to a web route inside the processes). Second usage is to store the logs in artifact in the CI system when something fails.

davidfowl commented 4 years ago

@nj0yeh How are you using this on a CI machine? I don't understand the scenario so help me a bit here.

nj0yeh commented 4 years ago

We use it as replacement for a Kubernetes environment. In an integration test, we run multiple processes and simulate different scenarios by sending web requests to the processes. When something fails, we need the logs (that are written to stdout and stderr) of all processes to analyze the error.

nj0yeh commented 4 years ago

This PR is the replacement for the kubectl logs command.

davidfowl commented 4 years ago

OK I think understand the scenario but I'm not a fan of this implementation. It also doesn't support the docker at the moment. Can you open an issue for this feature?

nj0yeh commented 4 years ago

It does support Docker. But I can open an issue for this as well.