=> Initial issue: when an exception is raised in a ruby widget, the error stack trace is not logged in the sonar.log filetags/3.2
@@ -37,16 +37,22 @@ | |||
</encoder> | |||
</appender> | |||
<!-- | |||
Profiling of HTTP requests. Set level to DEBUG in order to log all the HTTP and SQL requests. | |||
Example of command-line to get the HTTP requests with execution time greater than 10s : | |||
grep 'rails Completed in [0-9]\{5,\}ms' < profiling.log | |||
--> | |||
<!-- Display Rails warnings and errors in the standard Sonar log --> | |||
<logger name="rails" additivity="false"> | |||
<level value="WARN"/> | |||
<appender-ref ref="SONAR_FILE"/> | |||
</logger> | |||
<!-- | |||
Profiling of HTTP and SQL requests in Rails: | |||
<logger name="rails" additivity="false"> | |||
<level value="DEBUG"/> | |||
<appender-ref ref="PROFILING_FILE"/> | |||
</logger> | |||
Example of command-line to get the HTTP requests with execution time greater than 10s : | |||
grep 'rails Completed in [0-9]\{5,\}ms' < profiling.log | |||
--> | |||
<logger name="org.hibernate.cache.ReadWriteCache"> | |||
<!-- removing "An item was expired by the cache while it was locked (increase your cache timeout)" msg --> |
@@ -122,7 +122,7 @@ module DashboardHelper | |||
widget_body=render :inline => widget.java_definition.getTarget().getTemplate(), :locals => {:widget_properties => widget.properties_as_hash, :widget => widget, :dashboard_configuration => @dashboard_configuration} | |||
rescue => error | |||
logger.error(message('dashboard.cannot_render_widget_x', :params => [widget.java_definition.getId(), error])) | |||
logger.error(error.backtrace.join('\n')) | |||
error.backtrace.each { |line| logger.error(' ' + line) } | |||
end | |||
end | |||
@@ -5,7 +5,7 @@ | |||
widget_body=render :inline => @widget_definition.getTarget().getTemplate(), :locals => {:widget_properties => @widget.properties_as_hash, :widget => @widget, :dashboard_configuration => @dashboard_configuration} | |||
rescue => error | |||
logger.error(message('dashboard.cannot_render_widget_x', :params => [@widget_definition.getId(), error])) | |||
logger.error(error.backtrace.join("\n")) | |||
error.backtrace.each { |line| logger.error(' ' + line) } | |||
widget_body="" | |||
end | |||