Sajan
Sajan

Reputation: 1923

Understanding Rails logs

Request logs are shown in a format, which starts with something like below:

I, [2018-03-21T00:32:28.779383 #20153]  INFO -- : method=GET

I never had any interest about this but now I am curious to know, what that number #20153 represents ? Is that process id or database connection id or something else ?

This application uses Passenger app server.

Upvotes: 3

Views: 78

Answers (1)

Jyrki
Jyrki

Reputation: 568

The log format you posted here is the default logging format of Ruby’s own Logger class, which looks like this:

SeverityID, [DateTime #pid] SeverityLabel -- ProgName: message

So yes, the number after the timestamp you’re seeing in your logs is the process ID.

Upvotes: 4

Related Questions