aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuicommon/logging/TimeLogger.scala
blob: fbd17eb90c366f20c8f8c0ebf3e871a392bb7739 (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.core.auth.User

object TimeLogger extends PhiLogging {

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