Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tail_n_mail does not accept different timezone formats #31

Closed
andrusbate opened this issue Nov 26, 2018 · 3 comments
Closed

tail_n_mail does not accept different timezone formats #31

andrusbate opened this issue Nov 26, 2018 · 3 comments

Comments

@andrusbate
Copy link

andrusbate commented Nov 26, 2018

Hello,

I am using tail_n_mail-1.27.0.-1.sles12.noarch on linux SLES12 SP2.
I configured LOG_LINE_PREFIX equal to log_prefix_line for postgresql logs as '%t %e'.
So tail_n_mail was able to parse all necessary entries starting by timestamp an SQLSTATE type of:
2018-11-21 12:41:32 FET 00000 LOG: worker process: logical replication worker for subscription 16386 (PID 31777) exited with exit code 1

But after I have updated my SLES12 to SP3 tail_n_mail stopped noticing these entries.
2018-11-21 12:41:32 +03 00000 LOG: worker process: logical replication worker for subscription 16386 (PID 31777) exited with exit code 1

As you can see the reason is in different output of timezone. FET was before and +03 is our current format.
As far as I understand postgreSQL uses system default configuration and it is not possible to configure some particular timestamp format within PostgreSQL. So, I reckon, it can be corrected in tail_n_mail.

I see in tail_n_mail template that if log contains timestamp, timezone is supposed to be corresponding to
\w\w\w\w? pattern.
I would suggest changing this part of template by [+-]?\w+

Thank You in advance,
Andrei

@wkk1020
Copy link

wkk1020 commented Mar 19, 2019

Hi there, having same problem here, did you have any workaround?

Thank you.

Regards,
Mike Yeap

turnstep added a commit that referenced this issue May 2, 2019
…ssue #31. Also force the log_line prefix regular expressions to ASCII-only via the 'a' flag
@turnstep
Copy link
Contributor

turnstep commented May 2, 2019

Thanks for raising this issue. Please see if commit c12a779 fixes the problem for you.

@turnstep
Copy link
Contributor

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants