Hi there,I'm seeking to source some strategies for tailing server logs when running multiple servers at once. First let me explain what I'm doing. So I am authoring a Node.js tool that orchestrates localhost servers. You run the tool, and it launches all of your remembered localhost servers, proxying them through a local gateway. If it helps, you can think of this like `docker-compose up` for Node.js.I'm about to code the part where I kick off all of the server processes and I have some design choices to make.My gut says that Tmux would work well in this use case. I use a lot of automated console coloring, so this should preserve that work whereas tailing log files may not. While I do bootstrap installation of some external software as a part of my tool, I'm more inclined with Tmux to provide a user message and a fallback.It seems like providing the equivalent command to `docker logs [container]` may work for my tailing use case and may allow a user without Tmux to manually attach a CLI session to a server. As mentioned in the last paragraph, fear here is that console colorization is lost. I have a logging integration already with Winston, but overall I find Winston to be a bit painful to work with (even though I've wrapped it).I'm just hoping to sanity check this approach with others! Please, let's not sanity check the premise of the underlying tool though.. I'd like to think I know what I'm doing there :)
Submitted January 15, 2020 at 11:59AM by codingnature
No comments:
Post a Comment