Comments (5)
The log is there primarily to figure out what is broken, and I'd rather avoid stripping for two reasons:
- it will drive up the cost of logging
- it can mask potential problems by obscuring what was actually being set.
Tailing the log file should be a rare event; is there something that is causing you to do this frequently?
from watchman.
So my use case is to scp a jar file to a server every time it's successfully built. I want to see whether that is happening correctly, and as a quick solution, I simply tail the watchman log (while scp -v is set, so that I can see what the command is up to). I guess that's not the idiomatic way to do things, and that I should write a command that handles its own logging instead?
from watchman.
One of the things that people find awkward about triggers is that they are headless and continue running even when your terminal session is over. This is a feature but is a bit different from most of the other watchers out there.
One of the things on my mental TODO (although I could have sworn I had it transcribed in an issue here) is to have a session-oriented trigger mode, where you would do something like:
$ watchman fg-trigger <pattern> -- <command>
and that process would subscribe to the watchman service and spawn in your terminal session whenever matching files are changed. It could then log that it was running. Pressing CTRL-C would stop it from triggering, just like a regular unix command.
Since we don't have this today, another suggestion for you is to write a little wrapper script around the log subscriber command:
$ watchman --server-encoding=json --persistent log-level error | grep scp
or do something a bit more fancy to munge and format the json records as you prefer. You can play with the log level to adjust verbosity.
from watchman.
That makes sense. The log wrapper suggestion seems like it would serve my purposes. Thanks!
from watchman.
I'll close this out as it doesn't require any code change in watchman itself; Thanks!
from watchman.
Related Issues (20)
- not bin HOT 1
- Publish new serde_bser version
- Installation error: ‘CertUtils’ has not been declared in ‘fizz (Ubuntu 22.04.3 LTS) HOT 3
- Unable to install watchman on arch HOT 2
- Prebuilt Linux binaries are unusable on any modern system HOT 5
- PCRE link is broken
- MacOS binaries missing HOT 5
- Hard dependency on Homebrew HOT 1
- Windows binaries are missing
- Unable to install pywatchman
- Unable to build watchman from source for ubuntu in the latest versions of releases HOT 1
- Could you provide `fc39.x86_64.rpm`? HOT 1
- Error from yarn gets written into plist
- Prebuilt macOS binaries no longer exist HOT 5
- `watchman list` command crashes with boost/icu4c HOT 1
- `watchman --version` always return `0.0.0` when building from source HOT 2
- Unable to resolve module @babel/runtime/helpers/interopRequireDefault
- Wiji
- Mistake in Readme file
- Build failure: `'apache::thrift::HandlerCallbackPtr' has not been declared`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchman.