Skip to content

Commit

Permalink
Remove all explicit log4j calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed Dec 24, 2021
1 parent 2c00e5f commit 383e214
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ import geotrellis.raster.buffer.{BufferedTile, BufferSizes}
import geotrellis.raster.buffer.Direction._
import geotrellis.util._

import org.apache.log4j.Logger

import scala.collection.mutable.ArrayBuffer

object BufferTiles extends BufferTiles

trait BufferTiles {
val logger = Logger.getLogger(BufferTiles.getClass)

/** Collects tile neighbors by slicing the neighboring tiles to the given
* buffer size
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ object Dependencies {
}

def apacheSpark(module: String) = Def.setting {
"org.apache.spark" %% s"spark-$module" % ver("3.1.1", "3.2.0").value
"org.apache.spark" %% s"spark-$module" % ver("3.1.2", "3.2.0").value
}

def scalaReflect(version: String) = "org.scala-lang" % "scala-reflect" % version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import geotrellis.raster.stitch._
import geotrellis.layer.buffer.BufferTiles
import geotrellis.util._

import org.apache.log4j.Logger
import org.log4s._
import org.apache.spark.rdd.RDD
import org.apache.spark.Partitioner

import scala.reflect.ClassTag


object BufferTilesRDD extends BufferTiles {
override val logger = Logger.getLogger(BufferTilesRDD.getClass)
@transient private[this] lazy val logger = getLogger

def bufferWithNeighbors[
K: SpatialComponent: ClassTag,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import geotrellis.layer._
import geotrellis.spark._
import geotrellis.vector._

import org.apache.log4j.Logger
import org.log4s._
import org.apache.spark.rdd.RDD
import org.apache.spark.storage.StorageLevel
import org.apache.spark.util.AccumulatorV2
Expand All @@ -48,7 +48,7 @@ object IterativeCostDistance {
type KeyCostPair = (SpatialKey, SimpleCostDistance.Cost)
type Changes = mutable.ArrayBuffer[KeyCostPair]

val logger = Logger.getLogger(IterativeCostDistance.getClass)
@transient private[this] lazy val logger = getLogger

/**
* Compute the resolution (in meters per pixel) of a layer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import geotrellis.spark.costdistance.IterativeCostDistance._
import geotrellis.vector._

import org.locationtech.jts.{geom => jts}
import org.apache.log4j.Logger
import org.log4s._
import org.apache.spark.rdd.RDD
import org.apache.spark.storage.StorageLevel
import org.apache.spark.util.AccumulatorV2
Expand Down Expand Up @@ -65,7 +65,7 @@ object IterativeViewshed {
implicit def coordinatesToPoints(points: Seq[jts.Coordinate]): Seq[Viewpoint] =
points.map({ p => Viewpoint(p.getX, p.getY, p.getZ, 0, -1.0, Double.NegativeInfinity) })

private val logger = Logger.getLogger(IterativeViewshed.getClass)
@transient private[this] lazy val logger = getLogger

private case class Message(
target: SpatialKey,
Expand Down

0 comments on commit 383e214

Please sign in to comment.