#1 2023-08-18 23:46:45

antispam88
Member
Registered: 2016-08-19
Posts: 16

failed2ban doesn't work with UTC timestamps written in TSynLog.Log

Hi,
we want to use failed2ban to analyze our log files.
The problem is, that we don't have found a way to include the time zone in the timestamp string.
One solution would be setting the LocalTimestamp property to true.
But our preferred solution would be using utc timestamps.
So is it possible to change the datetime format to indicate utc timezone by configuation or do I have to derive TSynLog and override TSynLog.LogCurrentTime?
Maybe has someone already a solution for this.
Best regards,
antispam88

Offline

#2 2023-08-19 07:49:04

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: failed2ban doesn't work with UTC timestamps written in TSynLog.Log

So you just need to add 'Z' to all time stamps?

Something like https://github.com/synopse/mORMot2/commit/53d311f3 ?

Online

#3 2023-08-20 15:35:57

antispam88
Member
Registered: 2016-08-19
Posts: 16

Re: failed2ban doesn't work with UTC timestamps written in TSynLog.Log

Thank you for your quick response.
I will test it and give you reponse in a few days.
Nevertheless is there a plan to write the datetime in ISO-8601?
Best regards,
antispam88

Offline

Board footer

Powered by FluxBB