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

log exception backtrace in one log record #3403

Merged
merged 2 commits into from Dec 4, 2015

Conversation

Projects
None yet
1 participant
@kares
Member

kares commented Oct 20, 2015

jruby -Xlog.backtraces=true ... currently logs backtraces in multiple log records,
this can easily become an issue e.g. when multiple threads are logging backtraces at the same time.

this PR fixes the logging to produce one multi-line log item per backtrace and to use the JRuby format. seems that it could be useful for JRuby 1.7.x but in case of compatibility worries, I'm happy to target 9K only.

kares added some commits Oct 20, 2015

-Xlog.backtraces should log a single record for a given backtrace as …
…opposed to len+1

before:
```
2015-10-20T11:41:37.415+02:00: TraceType: Backtrace generated:
2015-10-20T11:41:37.415+02:00: TraceType:   uncaugh_exception.rb:20 in push
2015-10-20T11:41:37.415+02:00: TraceType:   uncaugh_exception.rb:28 in push_to_queue
2015-10-20T11:41:37.415+02:00: TraceType:   uncaugh_exception.rb:38 in (root)
```
after :
```
2015-10-20T12:31:04.682+02:00: TraceType: Backtrace generated:
           push at uncaugh_exception.rb:20
  push_to_queue at uncaugh_exception.rb:28
         (root) at uncaugh_exception.rb:38
```

@kares kares added the JRuby 1.7.x label Oct 20, 2015

@kares kares added this to the JRuby 1.7.24 milestone Dec 4, 2015

kares added a commit that referenced this pull request Dec 4, 2015

Merge pull request #3403 from jruby/log-backtrace-in-one-record
log exception backtrace in one log record

@kares kares merged commit 2784444 into jruby-1_7 Dec 4, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@kares kares deleted the log-backtrace-in-one-record branch Jan 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment