Skip to content

Ambiguous reference to overloaded definition in scala 2.13.0-RC1 #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Philippus opened this issue Apr 2, 2019 · 4 comments
Closed

Ambiguous reference to overloaded definition in scala 2.13.0-RC1 #157

Philippus opened this issue Apr 2, 2019 · 4 comments

Comments

@Philippus
Copy link
Contributor

Philippus commented Apr 2, 2019

There are a number of errors popping up in the community build for scala 2.13.0-RC1 in the *Spec files like this one:

ambiguous reference to overloaded definition,
[scala-logging] [error] both method error in trait Logger of type (x$1: String, x$2: Object*)Unit
[scala-logging] [error] and  method error in trait Logger of type (x$1: String, x$2: Any)Unit
[scala-logging] [error] match argument types (String,String)
[scala-logging] [error]       logger.error(msg, arg1)

I think the specs could be fixed with some clever annotations and/or asInstanceOf-stuff.
But I think it may require a nice proper fix, as it will probably hit real end-users of "scala-logging"?

See scala/bug#11453 for more information.

@Philippus Philippus changed the title Ambiguous reference to overloaded definition in scala 2.13.0 post M5 Ambiguous reference to overloaded definition in scala 2.13.0-RC1 Apr 7, 2019
@adriaanm
Copy link
Contributor

adriaanm commented May 13, 2019

The compile error has been fixed recently (verified on 2.13.0-pre-1ae9f82), still need to investigate the test failures (from https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/2106/consoleText). Details below FYI, or perhaps they ring a bell :-)

Done compiling.
LoggerTakingImplicitSpec:
Calling error with a message
- should call the underlying logger's error method if the error level is enabled
- should not call the underlying logger's error method if the error level is not enabled
Calling error with a message and cause
- should call the underlying logger's error method if the error level is enabled
- should not call the underlying logger's error method if the error level is not enabled
Calling error with a message and parameters
- should call the underlying logger's error method if the error level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.error("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$12(LoggerTakingImplicitSpec.scala:63)

However, there were other interactions with this mock:
logger.isErrorEnabled();
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$12(LoggerTakingImplicitSpec.scala:62)

logger.error("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$12(LoggerTakingImplicitSpec.scala:62)
  at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$12(LoggerTakingImplicitSpec.scala:63)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's error method if the error level is not enabled
Calling warn with a message
- should call the underlying logger's warn method if the warn level is enabled
- should not call the underlying logger's warn method if the warn level is not enabled
Calling warn with a message and cause
- should call the underlying logger's warn method if the warn level is enabled
- should not call the underlying logger's warn method if the warn level is not enabled
Calling warn with a message and parameters
- should call the underlying logger's warn method if the warn level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.warn("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$27(LoggerTakingImplicitSpec.scala:136)

However, there were other interactions with this mock:
logger.isWarnEnabled();
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$27(LoggerTakingImplicitSpec.scala:135)

logger.warn("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$27(LoggerTakingImplicitSpec.scala:135)
  at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$27(LoggerTakingImplicitSpec.scala:136)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's warn method if the warn level is not enabled
Calling info with a message
- should call the underlying logger's info method if the info level is enabled
- should not call the underlying logger's info method if the info level is not enabled
Calling info with a message and cause
- should call the underlying logger's info method if the info level is enabled
- should not call the underlying logger's info method if the info level is not enabled
Calling info with a message and parameters
- should call the underlying logger's info method if the info level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.info("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$42(LoggerTakingImplicitSpec.scala:209)

However, there were other interactions with this mock:
logger.isInfoEnabled();
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$42(LoggerTakingImplicitSpec.scala:208)

logger.info("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$42(LoggerTakingImplicitSpec.scala:208)
  at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$42(LoggerTakingImplicitSpec.scala:209)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's info method if the info level is not enabled
Calling debug with a message
- should call the underlying logger's debug method if the debug level is enabled
- should not call the underlying logger's debug method if the debug level is not enabled
Calling debug with a message and cause
- should call the underlying logger's debug method if the debug level is enabled
- should not call the underlying logger's debug method if the debug level is not enabled
Calling debug with a message and parameters
- should call the underlying logger's debug method if the debug level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.debug("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$57(LoggerTakingImplicitSpec.scala:282)

However, there were other interactions with this mock:
logger.isDebugEnabled();
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$57(LoggerTakingImplicitSpec.scala:281)

logger.debug("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$57(LoggerTakingImplicitSpec.scala:281)
  at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$57(LoggerTakingImplicitSpec.scala:282)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's debug method if the debug level is not enabled
Calling trace with a message
- should call the underlying logger's trace method if the trace level is enabled
- should not call the underlying logger's trace method if the trace level is not enabled
Calling trace with a message and cause
- should call the underlying logger's trace method if the trace level is enabled
- should not call the underlying logger's trace method if the trace level is not enabled
Calling trace with a message and parameters
- should call the underlying logger's trace method if the trace level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.trace("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$72(LoggerTakingImplicitSpec.scala:355)

However, there were other interactions with this mock:
logger.isTraceEnabled();
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$72(LoggerTakingImplicitSpec.scala:354)

logger.trace("corrId - msg", "arg1");
-> at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$72(LoggerTakingImplicitSpec.scala:354)
  at com.typesafe.scalalogging.LoggerTakingImplicitSpec.$anonfun$new$72(LoggerTakingImplicitSpec.scala:355)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's trace method if the trace level is not enabled
LoggerWithMarkerSpec:
Calling error with a marker and a message
- should call the underlying logger's error method if the error level is enabled
- should not call the underlying logger's error method if the error level is not enabled
- should call the underlying logger's error method if the error level is enabled and string is interpolated *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$8(LoggerWithMarkerSpec.scala:66)
Actual invocation has different arguments:
logger.error(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$8(LoggerWithMarkerSpec.scala:65)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$8(LoggerWithMarkerSpec.scala:66)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
Calling error with a marker and a message and cause
- should call the underlying logger's error method if the error level is enabled
- should not call the underlying logger's error method if the error level is not enabled
Calling error with a marker and a message and parameters
- should call the underlying logger's error method if the error level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.error(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$19(LoggerWithMarkerSpec.scala:93)

However, there were other interactions with this mock:
logger.isErrorEnabled(
    com.typesafe.scalalogging.DummyMarker$@20d686c1
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$19(LoggerWithMarkerSpec.scala:92)

logger.error(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$19(LoggerWithMarkerSpec.scala:92)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$19(LoggerWithMarkerSpec.scala:93)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's error method if the error level is not enabled
Calling warn with a marker and a message
- should call the underlying logger's warn method if the warn level is enabled
- should not call the underlying logger's warn method if the warn level is not enabled
- should call the underlying logger's warn method if the warn level is enabled and string is interpolated *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.warn(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$32(LoggerWithMarkerSpec.scala:134)
Actual invocation has different arguments:
logger.warn(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$32(LoggerWithMarkerSpec.scala:133)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$32(LoggerWithMarkerSpec.scala:134)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
Calling warn with a marker and a message and cause
- should call the underlying logger's warn method if the warn level is enabled
- should not call the underlying logger's warn method if the warn level is not enabled
Calling warn with a marker and a message and parameters
- should call the underlying logger's warn method if the warn level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.warn(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$43(LoggerWithMarkerSpec.scala:161)

However, there were other interactions with this mock:
logger.isWarnEnabled(
    com.typesafe.scalalogging.DummyMarker$@20d686c1
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$43(LoggerWithMarkerSpec.scala:160)

logger.warn(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$43(LoggerWithMarkerSpec.scala:160)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$43(LoggerWithMarkerSpec.scala:161)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's warn method if the warn level is not enabled
Calling info with a marker and a message
- should call the underlying logger's info method if the info level is enabled
- should not call the underlying logger's info method if the info level is not enabled
- should call the underlying logger's info method if the info level is enabled and string is interpolated *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.info(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$56(LoggerWithMarkerSpec.scala:202)
Actual invocation has different arguments:
logger.info(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$56(LoggerWithMarkerSpec.scala:201)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$56(LoggerWithMarkerSpec.scala:202)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
Calling info with a marker and a message and cause
- should call the underlying logger's info method if the info level is enabled
- should not call the underlying logger's info method if the info level is not enabled
Calling info with a marker and a message and parameters
- should call the underlying logger's info method if the info level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.info(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$67(LoggerWithMarkerSpec.scala:229)

However, there were other interactions with this mock:
logger.isInfoEnabled(
    com.typesafe.scalalogging.DummyMarker$@20d686c1
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$67(LoggerWithMarkerSpec.scala:228)

logger.info(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$67(LoggerWithMarkerSpec.scala:228)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$67(LoggerWithMarkerSpec.scala:229)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's info method if the info level is not enabled
Calling debug with a marker and a message
- should call the underlying logger's debug method if the debug level is enabled
- should not call the underlying logger's debug method if the debug level is not enabled
- should call the underlying logger's debug method if the debug level is enabled and string is interpolated *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.debug(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$80(LoggerWithMarkerSpec.scala:270)
Actual invocation has different arguments:
logger.debug(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$80(LoggerWithMarkerSpec.scala:269)
LoggerSpec:
Calling error with a message
- should call the underlying logger's error method if the error level is enabled
- should not call the underlying logger's error method if the error level is not enabled
Calling error with an interpolated message
- should call the underlying logger's error method with arguments if the error level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error(
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$7(LoggerSpec.scala:54)
Actual invocation has different arguments:
logger.error(
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$7(LoggerSpec.scala:53)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$7(LoggerSpec.scala:54)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$80(LoggerWithMarkerSpec.scala:270)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
  at org.scalatest.Transformer.apply(Transformer.scala:22)
- should call the underlying logger's error method with two arguments if the error level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error("msg {} {}", "arg1", 1);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$9(LoggerSpec.scala:61)
Actual invocation has different arguments:
logger.error("msg arg1 1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$9(LoggerSpec.scala:60)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$9(LoggerSpec.scala:61)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
  ...
Calling debug with a marker and a message and cause
Calling error with a message and cause
- should call the underlying logger's debug method if the debug level is enabled
- should call the underlying logger's error method if the error level is enabled
- should not call the underlying logger's error method if the error level is not enabled
Calling error with a message and parameters
- should call the underlying logger's error method if the error level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.error("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$17(LoggerSpec.scala:89)

However, there were other interactions with this mock:
logger.isErrorEnabled();
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$17(LoggerSpec.scala:88)

logger.error("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$17(LoggerSpec.scala:88)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$17(LoggerSpec.scala:89)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
- should not call the underlying logger's debug method if the debug level is not enabled
  ...
Calling debug with a marker and a message and parameters
- should not call the underlying logger's error method if the error level is not enabled
Calling warn with a message
- should call the underlying logger's debug method if the debug level is enabled *** FAILED ***
- should call the underlying logger's warn method if the warn level is enabled
- should not call the underlying logger's warn method if the warn level is not enabled
Calling warn with an interpolated message
- should call the underlying logger's warn method if the warn level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.debug(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$91(LoggerWithMarkerSpec.scala:297)

However, there were other interactions with this mock:
logger.isDebugEnabled(
    com.typesafe.scalalogging.DummyMarker$@20d686c1
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$91(LoggerWithMarkerSpec.scala:296)

logger.debug(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$91(LoggerWithMarkerSpec.scala:296)
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.warn(
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$27(LoggerSpec.scala:133)
Actual invocation has different arguments:
logger.warn(
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$27(LoggerSpec.scala:132)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$27(LoggerSpec.scala:133)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$91(LoggerWithMarkerSpec.scala:297)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should call the underlying logger's warn method with two arguments if the warn level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.warn("msg {} {}", "arg1", 1);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$29(LoggerSpec.scala:140)
Actual invocation has different arguments:
logger.warn("msg arg1 1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$29(LoggerSpec.scala:139)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$29(LoggerSpec.scala:140)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
  at org.scalatest.Transformer.apply(Transformer.scala:20)
Calling warn with a message and cause
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
- should call the underlying logger's warn method if the warn level is enabled
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
- should not call the underlying logger's warn method if the warn level is not enabled
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
Calling warn with a message and parameters
  ...
- should call the underlying logger's warn method if the warn level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.warn("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$37(LoggerSpec.scala:167)

However, there were other interactions with this mock:
logger.isWarnEnabled();
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$37(LoggerSpec.scala:166)

logger.warn("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$37(LoggerSpec.scala:166)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$37(LoggerSpec.scala:167)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
- should not call the underlying logger's debug method if the debug level is not enabled
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's warn method if the warn level is not enabled
Calling trace with a marker and a message
Calling info with a message
- should call the underlying logger's info method if the info level is enabled
- should call the underlying logger's trace method if the trace level is enabled
- should not call the underlying logger's info method if the info level is not enabled
Calling info with an interpolated message
- should not call the underlying logger's trace method if the trace level is not enabled
- should call the underlying logger's info method if the info level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.info(
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$47(LoggerSpec.scala:211)
Actual invocation has different arguments:
logger.info(
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$47(LoggerSpec.scala:210)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$47(LoggerSpec.scala:211)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
- should call the underlying logger's trace method if the trace level is enabled and string is interpolated *** FAILED ***
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.trace(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$104(LoggerWithMarkerSpec.scala:338)
Actual invocation has different arguments:
logger.trace(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$104(LoggerWithMarkerSpec.scala:337)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should call the underlying logger's info method with two arguments if the info level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.info("msg {} {}", "arg1", 1);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$49(LoggerSpec.scala:218)
Actual invocation has different arguments:
logger.info("msg arg1 1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$49(LoggerSpec.scala:217)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$49(LoggerSpec.scala:218)
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$104(LoggerWithMarkerSpec.scala:338)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  ...
  at org.scalatest.Transformer.apply(Transformer.scala:22)
Calling info with a message and cause
  at org.scalatest.Transformer.apply(Transformer.scala:20)
- should call the underlying logger's info method if the info level is enabled
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
- should not call the underlying logger's info method if the info level is not enabled
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
Calling info with a message and parameters
- should call the underlying logger's info method if the info level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.info("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$57(LoggerSpec.scala:245)

However, there were other interactions with this mock:
logger.isInfoEnabled();
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$57(LoggerSpec.scala:244)

logger.info("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$57(LoggerSpec.scala:244)
  ...
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$57(LoggerSpec.scala:245)
Calling trace with a marker and a message and cause
- should call the underlying logger's trace method if the trace level is enabled
- should not call the underlying logger's trace method if the trace level is not enabled
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's info method if the info level is not enabled
Calling debug with a message
- should call the underlying logger's debug method if the debug level is enabled
- should not call the underlying logger's debug method if the debug level is not enabled
Calling debug with an interpolated message
- should call the underlying logger's debug method if the debug level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.debug(
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$67(LoggerSpec.scala:288)
Actual invocation has different arguments:
logger.debug(
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$67(LoggerSpec.scala:287)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$67(LoggerSpec.scala:288)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
Calling trace with a marker and a message and parameters
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should call the underlying logger's trace method if the trace level is enabled *** FAILED ***
- should call the underlying logger's debug method with two arguments if the debug level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.debug("msg {} {}", "arg1", 1);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$69(LoggerSpec.scala:295)
Actual invocation has different arguments:
logger.debug("msg arg1 1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$69(LoggerSpec.scala:294)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$69(LoggerSpec.scala:295)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.trace(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$115(LoggerWithMarkerSpec.scala:365)

However, there were other interactions with this mock:
logger.isTraceEnabled(
    com.typesafe.scalalogging.DummyMarker$@20d686c1
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$115(LoggerWithMarkerSpec.scala:364)

logger.trace(
    com.typesafe.scalalogging.DummyMarker$@20d686c1,
    "msg",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$115(LoggerWithMarkerSpec.scala:364)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
Calling debug with a message and cause
- should call the underlying logger's debug method if the debug level is enabled
- should not call the underlying logger's debug method if the debug level is not enabled
Calling debug with a message and parameters
- should call the underlying logger's debug method if the debug level is enabled *** FAILED ***
  at com.typesafe.scalalogging.LoggerWithMarkerSpec.$anonfun$new$115(LoggerWithMarkerSpec.scala:365)
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.debug("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$77(LoggerSpec.scala:322)

However, there were other interactions with this mock:
logger.isDebugEnabled();
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$77(LoggerSpec.scala:321)

logger.debug("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$77(LoggerSpec.scala:321)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$77(LoggerSpec.scala:322)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's debug method if the debug level is not enabled
Calling trace with a message
- should call the underlying logger's trace method if the trace level is enabled
- should not call the underlying logger's trace method if the trace level is not enabled
Calling trace with an interpolated message
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
- should call the underlying logger's trace method if the trace level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.trace(
    "msg {} {} {}",
    "arg1",
    1,
    "arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$87(LoggerSpec.scala:366)
Actual invocation has different arguments:
logger.trace(
    "msg arg1 1 arg3"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$87(LoggerSpec.scala:365)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$87(LoggerSpec.scala:366)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  ...
- should call the underlying logger's trace method with two arguments if the trace level is enabled *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.trace("msg {} {}", "arg1", 1);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$89(LoggerSpec.scala:373)
Actual invocation has different arguments:
logger.trace("msg arg1 1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$89(LoggerSpec.scala:372)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$89(LoggerSpec.scala:373)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's trace method if the trace level is not enabled
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
Calling trace with a message and cause
- should call the underlying logger's trace method if the trace level is enabled
- should not call the underlying logger's trace method if the trace level is not enabled
Calling trace with a message and parameters
- should call the underlying logger's trace method if the trace level is enabled *** FAILED ***
  org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
logger.trace("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$97(LoggerSpec.scala:400)

However, there were other interactions with this mock:
logger.isTraceEnabled();
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$97(LoggerSpec.scala:399)

logger.trace("msg", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$97(LoggerSpec.scala:399)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$97(LoggerSpec.scala:400)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should not call the underlying logger's trace method if the trace level is not enabled
Logging a message using the standard string interpolator
- should call the underlying format method with boxed versions of value arguments *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error("msg {}", 1);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$102(LoggerSpec.scala:427)
Actual invocation has different arguments:
logger.error("msg 1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$102(LoggerSpec.scala:426)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$102(LoggerSpec.scala:427)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should call the underlying format method with boxed versions of arguments of type Any *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error("msg {}", 1);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$104(LoggerSpec.scala:434)
Actual invocation has different arguments:
logger.error("msg 1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$104(LoggerSpec.scala:433)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$104(LoggerSpec.scala:434)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should call the underlying format method escaping literal format anchors *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error("foo \{} bar {}", "arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$106(LoggerSpec.scala:441)
Actual invocation has different arguments:
logger.error("foo {} bar arg1");
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$106(LoggerSpec.scala:440)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$106(LoggerSpec.scala:441)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should call the underlying method without escaping format anchors when the message has no interpolations
- should call the underlying format method when the interpolated string contains escape sequences *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error(
    "foo
bar {}",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$110(LoggerSpec.scala:455)
Actual invocation has different arguments:
logger.error(
    "foo
bar arg1"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$110(LoggerSpec.scala:454)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$110(LoggerSpec.scala:455)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
- should call the underlying format method when the interpolated string is triple quoted and contains escape sequences *** FAILED ***
  org.mockito.exceptions.verification.ArgumentsAreDifferent: Argument(s) are different! Wanted:
logger.error(
    "foo
bar {}",
    "arg1"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$112(LoggerSpec.scala:462)
Actual invocation has different arguments:
logger.error(
    "foo
bar arg1"
);
-> at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$112(LoggerSpec.scala:461)
  at com.typesafe.scalalogging.LoggerSpec.$anonfun$new$112(LoggerSpec.scala:462)
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
  at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
  at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
  at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
  at org.scalatest.Transformer.apply(Transformer.scala:22)
  at org.scalatest.Transformer.apply(Transformer.scala:20)
  at org.scalatest.WordSpecLike$$anon$3.apply(WordSpecLike.scala:1075)
  at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
  at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
  ...
Logging a message using slf4 interpolator and Any args
- should map args to AnyRef for 2 args
- should map args to AnyRef for non 2 args
Serializing Logger
- should be usable after deserialization
- should constructed by explicit class and be usable after deserialization
- should constructed by implicit class tag and be usable after deserialization
Serializing LoggerTakingImplicit
- should be usable after deserialization
- should constructed by explicit class and be usable after deserialization
- should constructed by implicit class tag and be usable after deserialization
Run completed in 1 second, 138 milliseconds.
Total number of tests run: 119
Suites: completed 3, aborted 0
Tests: succeeded 84, failed 35, canceled 0, ignored 0, pending 0
*** 35 TESTS FAILED ***
Failed tests:
	com.typesafe.scalalogging.LoggerSpec
	com.typesafe.scalalogging.LoggerWithMarkerSpec
	com.typesafe.scalalogging.LoggerTakingImplicitSpec
(Test / test) sbt.TestsFailedException: Tests unsuccessful

@adriaanm
Copy link
Contributor

Oh wow, ok I see what's causing the test failures. The s string interpolator is now a macro, so LoggerMacro.deconstructInterpolatedMessage sees the concatenated trees rather than the StringContext call.

@adriaanm
Copy link
Contributor

adriaanm commented May 13, 2019

I think we're good for RC2 here, pushed a branch with quick & dirty fixes for tests: master...scalacommunitybuild:community-build-2.13

@adriaanm
Copy link
Contributor

By that I mean very specifically the compiler side of things looks ok. The scala-logging issues remain:

  • 2.13's s string interpolator is a (fast track) macro, so its expansion is seen in the logger macro
  • vararg matches and mockito? I have no idea what all those List(arg1): _* were about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants