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

import java.time.{LocalDateTime, ZoneId}

import xyz.driver.pdsuicommon.domain.{LongId, User}

object TimeLogger extends PhiLogging {

  def logTime(userId: LongId[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)} ")
  }
}