Skip to content
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 options to LogAction() so it can append (instead of truncate) and… #4329

Merged
merged 3 commits into from Aug 19, 2016
Merged

Conversation

wessels
Copy link

@wessels wessels commented Aug 17, 2016

… write without buffering.

Was so happy to discover LogAction() but disappointed that it truncates
the file each time the process starts, and apparently doesn't flush the
file upon exiting. With two new optional args, the file can be appended
rather than truncated and buffering disabled. The defaults remain as
before, which is to say to truncate and to buffer.

… write without buffering.

Was so happy to discover LogAction() but disappointed that it truncates
the file each time the process starts, and apparently doesn't flush the
file upon exiting.  With two new optional args, the file can be appended
rather than truncated and buffering disabled.  The defaults remain as
before, which is to say to truncate and to buffer.
@@ -1257,7 +1257,7 @@ instantiate a server with additional parameters
* `DelayAction(milliseconds)`: delay the response by the specified amount of milliseconds (UDP-only)
* `DisableValidationAction()`: set the CD bit in the question, let it go through
* `DropAction()`: drop these packets
* `LogAction([filename], [binary])`: Log a line for each query, to the specified file if any, to the console (require verbose) otherwise. When logging to a file, the `binary` optional parameter specifies whether we log in binary form (default) or in textual form
* `LogAction([filename], [binary])`: Log a line for each query, to the specified file if any, to the console (require verbose) otherwise. When logging to a file, the `binary` optional parameter specifies whether we log in binary form (default) or in textual form, the `append` optional parameter specifies whether we open the file for appending or truncate each time (default), and the `buffered` optional parameter specifies whether writes to the file are buffered (default) or not.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameters have not been updated in the prototype here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I missed that. Its added now.

@rgacogne
Copy link
Member

Thank you!

@rgacogne rgacogne merged commit 39368ff into PowerDNS:master Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants