Probably all stupid questions, but....
Is there any simple way to test the viability of a supposed date-time string,
before attempting to use the parsedate function to convert it? I'm attempting
to avoid the overhead of some complex regex comparison (on every log line)
simply to look for potential garbage lines. The problem being that if I grab
what I expect to be a date, at the beginning of the log line, and then feed it
to parsedate, the parsedate operation (sometimes) fails, and all of the other
lines behind it also fail (some of which are involved in reformatting the
output).
Part of the issue with the above is that one might suggest breaking the code
snippets into multiple Exec blocks, but the current Exec block starts by using
drop() to kill off commented header lines in the logs, so the rest of the
existing code is all in an Else leg (within that Exec block). And obviously,
secondary Exec blocks, that follow a drop(), end up generating other errors.
Anyway, I had simply that that maybe there was an "efficient" test that I'd
missed.
Different question. I see that datetime's are stored in UTC, but I also see
that now() returns the TZ-adjusted value. Is there a way to ask for the
current time, in UTC (e.g. to easily "substitute that value" for log file UTC
date/time stamps that are corrupted)?
Thanks for any/all suggestions.
Marvin Nipper
----------------------------------------------------------------------
The information transmitted, including any content in this communication is
confidential, is intended only for the use of the intended recipient and is the
property of The Western Union Company or its affiliates and subsidiaries. If
you are not the intended recipient, you are hereby notified that any use of the
information contained in or transmitted with the communication or
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this communication in error, please notify the
Western Union sender immediately by replying to this message and delete the
original message
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users