Questions tagged [scala-logging]

10 questions
12
votes
2 answers

Set log level for scala-logging

My console app takes a log-level= option. Looking at some examples in Java, it looks like changing SLF4J logger level is generally possible, but with scala-logging library it seems like this is not the case - regardless of how I create the…
Kombajn zbożowy
  • 8,755
  • 3
  • 28
  • 60
9
votes
1 answer

LazyLogging vs StrictLogging

I am using scala-logging. There are two classes LazyLogging and StrictLogging. I see, that the difference between them is that LazyLogging is initialized lazily. What is the purpose of that. When I should use one over the other and why?
rarry
  • 3,553
  • 20
  • 23
3
votes
0 answers

cannot log to console using scala-logging with logback.xml configuration on amazon-emr

I am using scala-logging with a logback.xml configuration file to send log messages to the console, but they do not appear. My code is running on an Amazon-EMR cluster and my code is called using spark-sumbit. My build.sbt file contains the…
digiplant
  • 273
  • 1
  • 10
2
votes
3 answers

Reducing the log output from Spark in a Scala program

I'm writing a Scala / Spark program following this example. My tools are IntelliJ and sbt. (I'm not using the scala spark shell.) I'm using scala-logging with logback-classic and I need to reduce the logging from Spark or direct the spark logging…
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
1
vote
0 answers

Using Scala Logging in a library codebase

I am in process of creating a library code in scala that would be used by a number of different applications. I did research and found that right approach for logging is to use a facade like slf4j. I also found that we have 'scala-logging' library…
KaustubhN
  • 195
  • 1
  • 2
  • 11
1
vote
1 answer

How exactly is Typesafe's scala-logging more performant than other logging frameworks?

On the Github page it says: It's performant, because thanks to Scala macros the check-enabled-idiom is applied and the following code is generated: if (logger.isDebugEnabled) logger.debug(s"Some $expensive message!") How is that more performant…
Ori Popowski
  • 10,432
  • 15
  • 57
  • 79
1
vote
1 answer

Scala logging, direct console output to log-file

Is there way to direct console-output to log file using scala logging. In below code println writes to console is there way to direct that to log-file as defined logback.xml. import com.typesafe.scalalogging.LazyLogging object FileProcessing…
Naga
  • 444
  • 2
  • 7
  • 18
0
votes
1 answer

Apache Spark Scala logging Exception in thread "main" java.lang.NoSuchFieldError: EMPTY_BYTE_ARRAY

Trying to add logging dependencies, I have a POM file like: org.apache.logging.log4j log4j-api-scala_2.12 12.0
Saeed Mohtasham
  • 1,693
  • 16
  • 27
0
votes
1 answer

How to override log level at an app level

Have a common spark cluster with log level set to error, Unable to override the log level at an App level.. Using "com.typesafe.scala-logging" %% "scala-logging" % Versions.typesafeScalaLoggingVersion, "ch.qos.logback" % "logback-classic" %…
Hemanth Gowda
  • 604
  • 4
  • 16
-2
votes
1 answer

Scala logging error, com.typesafe.scalalogging.LazyLogging.$init$ method not found

Hi I tried multiple combinations of including dependencies of scala logging, however I'm getting runtime error as method init not found. For detailed code and error I'm getting, please have a look here at my Github repository. PS: I do know there…
beingmanish
  • 1,040
  • 8
  • 21