Search code examples
javaloggingrestlet

What do the columns in the restlet log mean?


When I run a Restlet application, I see a log message when I hit the server. Here's a small sample (I've added a couple line breaks, where log message doesn't have them):

Dec 6, 2012 9:16:54 AM org.restlet.engine.log.LogFilter afterHandle
INFO: 2012-12-06    09:16:54    127.0.0.1   -   -   41020   POST
/act/login  -   200 32  85  2   
http://127.0.0.1:41020  Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11    
http://127.0.0.1:41020/

Now clearly I'm able to identify some of these columns.

The first says what generates the log message, LogFilter.afterHandle, but trying to wade through that was incredibly cryptic and got me nowhere.

The logging line:

  • clearly it's using SLF4J (confirmed by the documentation) INFO logging level
  • some timestamps.
  • Next we have the requester's IP address (I confirmed this by hitting my server from a second machine).
  • Then there's two dashes, and I don't know what they are.
  • Next is the port (41020)
  • Next is the protocol method, in this case it's a POST.
  • Next is the resource that was hit.
  • Then there's another dash I don't know its meaning.
  • Following this is the HTTP response code. In the example, we got 200 OK.
  • This is followed by three more numbers that I can't identify.

I've searched Restlet's documentation, waded through the code, and did oodles and oodles of Googles, but my search is, as yet, fruitless.

Could someone provide some insight as to what these dashes and magic numbers mean?


Solution

  • This is related to Restlet's LogService, which relies by default on JULI (java.util.logging mechanism).

    See more info here: https://restlet.talend.com/documentation/user-guide/2.4/core/services/log