# Custom log

**URL:** https://community.gatling.io/t/custom-log/2218
**Category:** Gatling (Open-Source)
**Created:** [April 20, 2015, 8:01am UTC](https://community.gatling.io/t/custom-log/2218 "2015-04-20T08:01:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Aram](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Aram](https://community.gatling.io/u/Aram)
#### Post date: [April 20, 2015, 8:01am UTC](https://community.gatling.io/t/custom-log/2218/1 "2015-04-20T08:01:04Z")

</div>

Is there an easy way to log the total runtime of one virtual user?

```auto
.extraInfoExtractor(extraInfo => List(extraInfo.response.firstByteSent, extraInfo.response.lastByteReceived))

```

Then write something to calculate the time?

---

<div class="post-metadata">

### Author: ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)
#### Post date: [April 20, 2015, 3:45pm UTC](https://community.gatling.io/t/custom-log/2218/2 "2015-04-20T15:45:18Z")

</div>

Have you tried looking at the simulation.log?

---

<div class="post-metadata">

### Author: ![Jean\_Helou](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@Jean\_Helou](https://community.gatling.io/u/Jean_Helou)
#### Post date: [April 21, 2015, 7:16am UTC](https://community.gatling.io/t/custom-log/2218/3 "2015-04-21T07:16:19Z")

</div>

you probably want to add the userId to the extraInfo, then when analysing the log to create the report you can use that to compute the total runtime for each user.

if you want to get an idea of the records structure in the log file have a look at [https://github.com/gatling/gatling/blob/master/gatling-charts/src/main/scala/io/gatling/charts/result/reader/FileDataReader.scala](https://github.com/gatling/gatling/blob/master/gatling-charts/src/main/scala/io/gatling/charts/result/reader/FileDataReader.scala) and [https://github.com/gatling/gatling/blob/master/gatling-charts/src/main/scala/io/gatling/charts/result/reader/Records.scala](https://github.com/gatling/gatling/blob/master/gatling-charts/src/main/scala/io/gatling/charts/result/reader/Records.scala)

which are the default classes used to parse the simulation log.

jean
