itspire / monolog-loki

BSD 3-Clause "New" or "Revised" License
61 stars 22 forks source link

How to change the time? #25

Open l2aelba opened 1 day ago

l2aelba commented 1 day ago

I trying to import the old logs to Loki

Is there any function I can change the time?

Thanks.

rrajkomar commented 1 day ago

Hi,
this would be a question more suited on the monolog projet : see https://github.com/Seldaek/monolog .

As far as I can see, I think the only way to do this would be to create new LogRecord instance with the adequate datetime and then pass those records to the LokiHandler::handleBatch method.

However this is something I've never attempted so this is purely theoretical.