@@ -5,11 +5,11 @@ def initialize
55 @@errors_governor = Stackify ::ErrorsGovernor . new
66 end
77
8- def log level , msg
8+ def log level , msg , call_trace
99 Stackify ::Utils . do_only_if_authorized_and_mode_is_on Stackify ::MODES [ :logging ] do
1010 if acceptable? level , msg && Stackify . working?
1111 worker = Stackify ::AddMsgWorker . new
12- task = log_message_task level , msg
12+ task = log_message_task level , msg , call_trace
1313 worker . async_perform ScheduleDelay . new , task
1414 end
1515 end
@@ -56,9 +56,12 @@ def is_appropriate_env?
5656 Stackify . configuration . env . downcase . to_sym == Stackify ::EnvDetails . instance . auth_info [ 'ConfiguredEnvironmentName' ] . downcase . to_sym
5757 end
5858
59- def log_message_task level , msg
59+ def log_message_task level , msg , call_trace
6060 Stackify ::ScheduleTask . new ( { limit : 1 } ) do
61- Stackify . msgs_queue << Stackify ::MsgObject . new ( level , msg , caller [ 0 ] ) . to_h
61+ e = Exception . new ( msg )
62+ e . set_backtrace ( call_trace )
63+ ex = StackifiedError . new ( e , binding ( ) )
64+ Stackify . msgs_queue << Stackify ::MsgObject . new ( level , ex . message , caller [ 0 ] , ex ) . to_h
6265 end
6366 end
6467
0 commit comments