akka/akka-core

performance issue for logging which get timestamp via System.currentTimeMillis

Open

#16.131 geöffnet am 23. Okt. 2014

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Scala (3.547 Forks)batch import
1 - triagedhelp wantedt:core

Repository-Metriken

Stars
 (13.277 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T 19h) (10 gemergte PRs in 30 T)

Beschreibung

currently:I'm writing an event logger which stream the event to the graylog2,when I am handing it,I found that I can't provide a customer time stamp,cause currently https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/event/Logging.scala#L609 the time stamp was generated at the create time,but if I want to create the time buy may self? I think I could get time stamp from a service tick one step per second. to override this,I have a hard path to go. 1.LogEvent was sealed 2.logingBus was returned by default. 3.with actorLogging return logingBus by default.

so how about provide a more config way to make user could them self logging time stamp generator? like which implement a trait like

trait TimeStampGenerator{
def timestamp:Long
}

akka.log.timestamp-generator="some-clazz"

Contributor Guide