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

'--suppress-repeated-stacktrace' is true by default #446

Merged
merged 2 commits into from
Oct 2, 2014

Conversation

repeatedly
Copy link
Member

We keep this option for backward compatibility.
Maybe, there is no user who wants to disable this option on production.
We will remove related code in the future.

From this patch, fluentd behaviour is:

  1. without '--suppress-repeated-stacktrace', suppress logs
  2. with '--suppress-repeated-stacktrace', suppress logs
  3. with '--suppress-repeated-stacktrace true', suppress logs
  4. with ''--suppress-repeated-stacktrace false', no suppress logs

We keep this option for backward compatibility.
Maybe, there is no user who wants to disable this option.
We will remove related code in the future.
@tagomoris
Copy link
Member

For debug of Fluentd itself, we need --express-repeated-stacktrace (default false) option!

@repeatedly
Copy link
Member Author

Error content is still logged in the log.
Isn't it enough?

2014-10-02 18:11:37 +0900 [warn]: emit transaction failed  error_class=ArgumentError error=#<ArgumentError: hoge!>
  2014-10-02 18:11:37 +0900 [warn]: suppressed same stacktrace

@repeatedly
Copy link
Member Author

Patch for supporting non-suppress mode with --suppress-repeated-stacktrace false:

diff --git a/lib/fluent/command/fluentd.rb b/lib/fluent/command/fluentd.rb
index dcd3149..b13568d 100644
--- a/lib/fluent/command/fluentd.rb
+++ b/lib/fluent/command/fluentd.rb
@@ -70,7 +70,8 @@ op.on('--emit-error-log-interval SECONDS', "suppress interval seconds of emit er
   opts[:suppress_interval] = s.to_i
 }

-op.on('--suppress-repeated-stacktrace', "suppress repeated stacktrace", TrueClass) {|b|
+op.on('--suppress-repeated-stacktrace [VALUE]', "suppress repeated stacktrace", TrueClass) {|b|
+  b = true if b.nil?
   opts[:suppress_repeated_stacktrace] = b
 }

@tagomoris
Copy link
Member

"Isn't it enough?" Yes. Controllable points are welcome :)

@repeatedly
Copy link
Member Author

@tagomoris added. Please check again.

@tagomoris
Copy link
Member

LGTM!

@sonots
Copy link
Member

sonots commented Oct 2, 2014

👍 --suppress-repeated-stacktrace false is nice.

repeatedly added a commit that referenced this pull request Oct 2, 2014
…efault

'--suppress-repeated-stacktrace' is true by default
@repeatedly repeatedly merged commit ae86296 into master Oct 2, 2014
@repeatedly repeatedly deleted the suppress-repeated-stacktrace-by-default branch October 2, 2014 10:15
@sonots sonots added the v0.10 label Nov 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants