# File lib/phusion_passenger/union_station/transaction.rb, line 48
        def message(text)
                if !@connection
                        timestamp_string = Core.timestamp_string
                        trace(3, "[Union Station log to null] #{@txn_id} #{timestamp_string} #{text}")
                        return
                end
                @connection.synchronize do
                        return if !@connection.connected?
                        begin
                                timestamp_string = Core.timestamp_string
                                trace(3, "[Union Station log] #{@txn_id} #{timestamp_string} #{text}")
                                @connection.channel.write("log", @txn_id, timestamp_string)
                                @connection.channel.write_scalar(text)
                        rescue SystemCallError, IOError => e
                                @connection.disconnect
                                warn("Error communicating with the logging agent: #{e.message}")
                        rescue Exception => e
                                @connection.disconnect
                                raise e
                        end
                end
        end