Skip to content

log exception backtrace in one log record#3403

Merged
kares merged 2 commits intojruby-1_7from
log-backtrace-in-one-record
Dec 4, 2015
Merged

log exception backtrace in one log record#3403
kares merged 2 commits intojruby-1_7from
log-backtrace-in-one-record

Conversation

@kares
Copy link
Member

@kares 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 2 commits October 20, 2015 12:35
…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 this to the JRuby 1.7.24 milestone Dec 4, 2015
kares added a commit that referenced this pull request Dec 4, 2015
log exception backtrace in one log record
@kares kares merged commit 2784444 into jruby-1_7 Dec 4, 2015
@kares kares deleted the log-backtrace-in-one-record branch January 11, 2016 14:53
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.

1 participant