Skip to content

Commit

Permalink
Forgot to add header again
Browse files Browse the repository at this point in the history
  • Loading branch information
morgen-peschke committed May 31, 2024
1 parent ccb0e27 commit 8ed6876
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ import cats.effect.IO
import cats.syntax.all.*
import org.typelevel.log4cats.SelfAwareStructuredLogger
import org.typelevel.log4cats.testing.TestingLoggerFactory
import org.typelevel.log4cats.testing.TestingLoggerFactory.{Debug, Error, Info, LogMessage, Trace, Warn}
import org.typelevel.log4cats.testing.TestingLoggerFactory.{
Debug,
Error,
Info,
LogMessage,
Trace,
Warn
}

import scala.annotation.nowarn

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2018 Typelevel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.typelevel.log4cats.extras

import cats.effect.IO
Expand All @@ -13,7 +29,12 @@ class LogMessageTest extends munit.CatsEffectSuite {

IO.delay(LogMessage(LogLevel.Info, haltAndCatchFire, none, Map.empty))
.attemptTap { result =>
IO.delay(assert(result.isRight, clue("Should be ok here, the lazy exception shouldn't be triggered yet")))
IO.delay(
assert(
result.isRight,
clue("Should be ok here, the lazy exception shouldn't be triggered yet")
)
)
}
.flatTap { lm =>
IO.delay(lm.lazyMessage()).intercept[HaltAndCatchFire]
Expand Down

0 comments on commit 8ed6876

Please sign in to comment.