jbe/bsw@0: --[[-- jbe/bsw@0: trace.request{ jbe/bsw@0: module = module, jbe/bsw@0: view = view, jbe/bsw@0: action = action jbe/bsw@0: } jbe/bsw@0: jbe/bsw@0: This function is called automatically to log which view or action has been requested by the web browser. jbe/bsw@0: jbe/bsw@0: --]]-- jbe/bsw@0: jbe/bsw@0: function trace.request(args) jbe/bsw@0: local module = args.module jbe/bsw@0: local view = args.view jbe/bsw@0: local action = args.action jbe/bsw@0: if type(module) ~= "string" then jbe/bsw@0: error("No module string passed to trace.request{...}.") jbe/bsw@0: end jbe/bsw@0: if view and action then jbe/bsw@0: error("Both view and action passed to trace.request{...}.") jbe/bsw@0: end jbe/bsw@0: if not (view or action) then jbe/bsw@0: error("Neither view nor action passed to trace.request{...}.") jbe/bsw@0: end jbe/bsw@0: if view and type(view) ~= "string" then jbe/bsw@0: error("No view string passed to trace.request{...}.") jbe/bsw@0: end jbe/bsw@0: if action and type(action) ~= "string" then jbe/bsw@0: error("No action string passed to trace.request{...}.") jbe/bsw@0: end jbe/bsw@0: trace._new_entry{ jbe/bsw@0: type = "request", jbe/bsw@0: module = args.module, jbe/bsw@0: view = args.view, jbe/bsw@0: action = args.action jbe/bsw@0: } jbe/bsw@0: end