Skip to content

Commit

Permalink
Merge pull request #24 from sematext/rename_geo_location_field
Browse files Browse the repository at this point in the history
Rename field from location to geoip.location
  • Loading branch information
Rafał Kuć authored Jun 8, 2020
2 parents e6fbe2c + cb44dde commit 9c8e6da
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "2.2.2"
versionName "2.3.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion logseneandroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 19
targetSdkVersion 28
versionCode 4
versionName "2.2.2"
versionName "2.3.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,12 @@ private void enrich(JSONObject obj) {

// create a location out of lat and lon fields
if (obj.has("lat") && obj.has("lon")) {
obj.put("location", String.format("%.2f,%.2f",
JSONObject geoip = new JSONObject();
geoip.put("location", String.format("%.2f,%.2f",
obj.getDouble("lat"), obj.getDouble("lon")));
obj.remove("lat");
obj.remove("lon");
obj.put("geoip", geoip);
}
} catch (JSONException e) {
// thrown when key is null in put(), so should never happen
Expand Down

0 comments on commit 9c8e6da

Please sign in to comment.