popcorn :: LogEntry :: defaultinit
popcorn :: LogEntry :: request=
HTTP request that triggered that log entrypopcorn :: LogEntry :: response=
HTTP response returned by the serveurpopcorn :: LogEntry :: response_time
Processing time in miliseconds (or null if no clock was found in request)popcorn :: LogEntry :: response_time=
Processing time in miliseconds (or null if no clock was found in request)popcorn :: LogEntry :: user_agent
Request user-agent shortcut (easier for db requestspopcorn :: LogEntry :: user_agent=
Request user-agent shortcut (easier for db requestspopcorn $ LogEntry :: core_serialize_to
Actual serialization ofself
to serializer
popcorn $ LogEntry :: from_deserializer
Create an instance of this class from thedeserializer
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePackserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
popcorn :: LogEntry :: defaultinit
core :: Object :: defaultinit
popcorn :: RepoObject :: defaultinit
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arraycore :: Object :: output_class_name
Display class name on stdout (debug only).popcorn :: LogEntry :: request=
HTTP request that triggered that log entrypopcorn :: LogEntry :: response=
HTTP response returned by the serveurpopcorn :: LogEntry :: response_time
Processing time in miliseconds (or null if no clock was found in request)popcorn :: LogEntry :: response_time=
Processing time in miliseconds (or null if no clock was found in request)serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
popcorn :: LogEntry :: user_agent
Request user-agent shortcut (easier for db requestspopcorn :: LogEntry :: user_agent=
Request user-agent shortcut (easier for db requestsSerializer::serialize
# A tracker log entry used to store HTTP requests and their given HTTP responses
class LogEntry
super RepoObject
serialize
# HTTP request that triggered that log entry
var request: HttpRequest
# HTTP response returned by the serveur
var response: HttpResponse
# Request user-agent shortcut (easier for db requests
var user_agent: nullable String is lazy do return request.header["User-Agent"]
# Processing time in miliseconds (or null if no clock was found in request)
var response_time: nullable Int is lazy do
var clock = request.clock
if clock == null then return null
return (clock.total * 1000.0).to_i
end
# Log entry timestamp
var timestamp: Int = get_time
# Session ID associated to this entry
var session: nullable String is lazy do
var session = request.session
if session == null then return null
return session.id_hash
end
end
lib/popcorn/pop_tracker.nit:202,1--232,3