aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuicommon/logging/TimeLogger.scala
blob: 349d92582b7a7438e4a9db6421e85939edb9d468 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package xyz.driver.pdsuicommon.logging

import java.time.{LocalDateTime, ZoneId}

import xyz.driver.core.auth.User
import xyz.driver.pdsuicommon.domain.StringId

object TimeLogger extends PhiLogging {

  def logTime(userId: StringId[User], label: String, obj: String): Unit = {
    val now = LocalDateTime.now(ZoneId.of("Z"))
    logger.info(phi"User id=$userId performed an action at ${Unsafe(label)}=$now with a ${Unsafe(obj)} ")
  }
}