Different TImezone on default log format vs custom log format

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Different TImezone on default log format vs custom log format

Willy Mularto-2
Hi All,
I found that there's difference timezone used on log file by Kannel when we set it as default and when we set a custom log format. What makes this happen? I am on GMT+7 when I use custom log the result will be like this (use GMT which is not expected):

2018-01-17 23:52:25 Sent SMS [SMSC:XXX].....

018-01-17 23:52:25 Receive DLR [SMSC:XXX]


But when use default log format will be  (use GMT+7 which is correct based on my localtime):

2018-01-18 07:01:20 Sent SMS [SMSC:XXX]

2018-01-18 07:01:20 Receive DLR [SMSC:XXX]

Reply | Threaded
Open this post in threaded view
|

Re: Different TImezone on default log format vs custom log format

amalysh
Hi Willy,

yes, you are right, this is not expected and looks like a bug BUT if we fix it, it will break many installations :-(

We have to synchronise and merge URL and access log format escape codes.

Thanks,
Alex

Am 18.01.2018 um 01:21 schrieb Willy Mularto <[hidden email]>:

Hi All,
I found that there's difference timezone used on log file by Kannel when we set it as default and when we set a custom log format. What makes this happen? I am on GMT+7 when I use custom log the result will be like this (use GMT which is not expected):

2018-01-17 23:52:25 Sent SMS [SMSC:XXX].....

018-01-17 23:52:25 Receive DLR [SMSC:XXX]

But when use default log format will be  (use GMT+7 which is correct based on my localtime):

2018-01-18 07:01:20 Sent SMS [SMSC:XXX]

2018-01-18 07:01:20 Receive DLR [SMSC:XXX]

Reply | Threaded
Open this post in threaded view
|

Re: Different TImezone on default log format vs custom log format

Willy Mularto-2
Hi Alex,
Thanks for the reply, I think it's not a major issue but will be good if we can do a fix. BTW what do you mean with "will break many installations"? will it impact current installation when someone upgrade it? 

On Thu, Jan 18, 2018 at 11:19 PM, <[hidden email]> wrote:
Hi Willy,

yes, you are right, this is not expected and looks like a bug BUT if we fix it, it will break many installations :-(

We have to synchronise and merge URL and access log format escape codes.

Thanks,
Alex


Am 18.01.2018 um 01:21 schrieb Willy Mularto <[hidden email]>:

Hi All,
I found that there's difference timezone used on log file by Kannel when we set it as default and when we set a custom log format. What makes this happen? I am on GMT+7 when I use custom log the result will be like this (use GMT which is not expected):

2018-01-17 23:52:25 Sent SMS [SMSC:XXX].....

018-01-17 23:52:25 Receive DLR [SMSC:XXX]

But when use default log format will be  (use GMT+7 which is correct based on my localtime):

2018-01-18 07:01:20 Sent SMS [SMSC:XXX]

2018-01-18 07:01:20 Receive DLR [SMSC:XXX]


Reply | Threaded
Open this post in threaded view
|

Re: Different TImezone on default log format vs custom log format

amalysh
Hi,

sure it will impact, or we leave %t as is (GMT) and add new escape sequence…

Alex


Am 18.01.2018 um 23:49 schrieb Willy Mularto <[hidden email]>:

Hi Alex,
Thanks for the reply, I think it's not a major issue but will be good if we can do a fix. BTW what do you mean with "will break many installations"? will it impact current installation when someone upgrade it? 

On Thu, Jan 18, 2018 at 11:19 PM, <[hidden email]> wrote:
Hi Willy,

yes, you are right, this is not expected and looks like a bug BUT if we fix it, it will break many installations :-(

We have to synchronise and merge URL and access log format escape codes.

Thanks,
Alex


Am 18.01.2018 um 01:21 schrieb Willy Mularto <[hidden email]>:

Hi All,
I found that there's difference timezone used on log file by Kannel when we set it as default and when we set a custom log format. What makes this happen? I am on GMT+7 when I use custom log the result will be like this (use GMT which is not expected):

2018-01-17 23:52:25 Sent SMS [SMSC:XXX].....

018-01-17 23:52:25 Receive DLR [SMSC:XXX]

But when use default log format will be  (use GMT+7 which is correct based on my localtime):

2018-01-18 07:01:20 Sent SMS [SMSC:XXX]

2018-01-18 07:01:20 Receive DLR [SMSC:XXX]



Reply | Threaded
Open this post in threaded view
|

Re: Different TImezone on default log format vs custom log format

Willy Mularto-2
Hi Alex,
The funny thing is, it only impact to access-log. And agree to that approach, just leave %t as it is, and we add another new one escape code to use local-time rather than fix the "bug". So it's an RFC then ;)

On Fri, Jan 19, 2018 at 9:22 PM, <[hidden email]> wrote:
Hi,

sure it will impact, or we leave %t as is (GMT) and add new escape sequence…

Alex


Am 18.01.2018 um 23:49 schrieb Willy Mularto <[hidden email]>:

Hi Alex,
Thanks for the reply, I think it's not a major issue but will be good if we can do a fix. BTW what do you mean with "will break many installations"? will it impact current installation when someone upgrade it? 

On Thu, Jan 18, 2018 at 11:19 PM, <[hidden email]> wrote:
Hi Willy,

yes, you are right, this is not expected and looks like a bug BUT if we fix it, it will break many installations :-(

We have to synchronise and merge URL and access log format escape codes.

Thanks,
Alex


Am 18.01.2018 um 01:21 schrieb Willy Mularto <[hidden email]>:

Hi All,
I found that there's difference timezone used on log file by Kannel when we set it as default and when we set a custom log format. What makes this happen? I am on GMT+7 when I use custom log the result will be like this (use GMT which is not expected):

2018-01-17 23:52:25 Sent SMS [SMSC:XXX].....

018-01-17 23:52:25 Receive DLR [SMSC:XXX]

But when use default log format will be  (use GMT+7 which is correct based on my localtime):

2018-01-18 07:01:20 Sent SMS [SMSC:XXX]

2018-01-18 07:01:20 Receive DLR [SMSC:XXX]