Skip to content

Commit

Permalink
core-scala toPipeline logLevel support (#83)
Browse files Browse the repository at this point in the history
* core-scala toPipeline logLevel support

* examples README.md update
  • Loading branch information
pomadchin authored Jan 21, 2024
1 parent 37b3e4e commit c0aecc8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package io.pdal.pipeline

import io.pdal.Pipeline

import io.pdal.{LogLevel, Pipeline}
import io.circe.{Decoder, Encoder, Json}
import io.circe.syntax._

Expand All @@ -30,6 +29,7 @@ case class PipelineConstructor(list: List[PipelineExpr]) {
def ~(e: Option[PipelineExpr]): PipelineConstructor = e.fold(this)(this ~ _)
def map[B](f: PipelineExpr => B): List[B] = list.map(f)
def toPipeline: Pipeline = Pipeline(this.asJson.noSpaces)
def toPipeline(logLevel: LogLevel.Value): Pipeline = Pipeline(this.asJson.noSpaces, logLevel)
}

object PipelineConstructor {
Expand Down
8 changes: 6 additions & 2 deletions examples/pdal-jni/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# PDAL JNI usage example

To run this demo just launch `./sbt run` command and choose `1`
to run a basic `pdal-core` example, choose `2` to run a basic `pdal-core` example in Java, and choose `3` to run as basic `pdal-scala` example.
To run this demo just launch `sbt run` command and choose:

* `1` to run a basic `pdal-core` example
* `2` to run a basic `pdal-core` example in Java
* `3` to run a basic `pdal-core` example with the debugging log level configured
* `4` to run as basic `pdal-scala` example
4 changes: 4 additions & 0 deletions examples/pdal-jni/src/main/scala/com/azavea/MainLogging.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.azavea

import io.pdal.Pipeline

import io.pdal._

object MainLogging {
val json =
"""
Expand Down

0 comments on commit c0aecc8

Please sign in to comment.