O'Reilly logo

Learning Storm by Anand Nalya, Ankit Jain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Identifying the country, the operating system type, and the browser type from the logfile

This section explains how you can identify a user's country name, the operating system type, and the browser type by analyzing the server log line. By identifying the country name, we can easily identify the locations from where our site is attracting more attention and where it is getting less attention. Let's perform the following steps to identify the country name, operating system type, and browser type from the Apache log line:

  1. We will use the open source geoip library to identify the country name from the IP address. Add the following dependencies to the pom.xml file:
     <dependency> <groupId>org.geomind</groupId> <artifactId>geoip</artifactId> <version>1.2.8</version> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required