-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add log rotation support #58
Comments
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
This is doable in most common cases; if we were passed a log file name argument, then we can periodically check the size and rotate. |
I am interested to work on this feature. @wez Could you please suggest me from where should I start? I've built _watchman_ on my machine. |
@qmaruf yep, the high level idea is that we'd want to rotate the log file. This is typically implemented in one of two ways:
We can support both of these things. The high level plan is:
I consider the following things to be non-goals for watchman; our focus is on answering questions about the filesystem rather than re-implementing features that exist in other widely deployed software:
|
Is there any way to print something in console using _printf()_ while watchman is running, for debugging purpose? I am using _watchman --server-encoding=json --persistent log-level debug_, but it only prints log info. I need to understand the sequence of execution. |
you can use |
@wez What does watchman do after |
I'm not sure I understand your question. The client responses are de-queued dispatched here: https://github.com/facebook/watchman/blob/master/listener.c#L495 but that is completely unrelated to the log file related functions that are in log.c |
I thought message is being written to log file after dequeuing from |
Is this feature still planned to be added? I'm on Linux and noticed one day that |
I think we ought to rotate this log once in a while. Mine is 202 MiB..
-rw------- 1 bgertzfield THEFACEBOOK\Domain Users 202409754 Oct 7 08:57 .watchman.bgertzfield.log
The text was updated successfully, but these errors were encountered: