On 11/23/06, Eric Shubes <[EMAIL PROTECTED]> wrote:
Bill Kwok wrote: > You are right. (lucky guess, and a nice objective that I honestly hadn't considered) > To shorten the output is my main goal: > > 1. TAI64 time stamp - To allow user select date format. My > understanding is that tai64nlocal can only output the lengthy > format. So we may need to use some other program to convert the > date format? I think I'd stick with tai64nlocal to do the initial conversion, then use sed w/ regex to shorten it. Would lopping off the microseconds suffice? I suppose we could ditch the '20' part of the year too, or the year entirely. To KISS, I'd like to initially have no optional stuff. So should we simply ditch the year and microseconds? I think that'd be easy and simple.
Most of the time, I prefer to have HH:MM:SS only. But for people who prefer to have yy-mm-dd, or even yyMMMdd, it will be a problem. But as a starting, I guess we can just use yymmdd HH:MM:SS format for now.
2. Content replacement - To allow user to predefine wordings for > search and replace. That seems simple enough. If I understand what you mean, we can have a configuration file that might contain two fields on each line something like: tcpserver: tcpsrv: regex replacement where the first field would contain a regex to match, and the second field would contain the replacement string. I'm not exactly sold on this feature. Can you give me an example or two where it'd be useful?
Somehow I don't like the original message format which is too long, for example: delivery 44176: success: User_and_password_not_set,_continuing_without_authentication./< [EMAIL PROTECTED]>_n.n.n.n_accepted_message./Remote_host_said:_250_ok:__Message_172326093_accepted/ I would like to trim the 'continuing_without_authentication.', so that I can show each physical line in one row, without wrapping to next line. Perhaps we could use a common configuration file to default certain options,
such as shortened date, or whatever else. /etc/qmlog.conf sounds logical. > 3. Content filtering - Show only lines with / without user-defined > wordings Positive/negative grep options should be no problem. > Other than that, it's just 2 minor settings to allow user to define: > > 1. log file location I'm not sure why this is needed, but it's easy to do. > 2. file name(s) Easy enough too. For this one, perhaps it'd be nice to be able to select a date/time range to display. Could be a bit tricky, but I think it'd be a lot friendlier than selecting by file name. Selecting files from a date range would be easy enough though.
The reason why I prefer to have directory name option is that I run cron job to move log files to a separate directory (such as /var/log/qmail/oldlog/200611/send), so that I can retrieve logs when required. When I need to look for records of certain day, I will show all logs in that month folder with filtering. To keep logs for busy server, may be they need to have a more structural directory, such as /var/log/qmail/oldlog/2006/11/23/send For the file name option, I was thinking may be someone, like you :), may has already had utility to regroup log files to certain format, such as by date, or even by hour for busy server. Then they may specify a file name in order to retrieve logs by date (or even hour).
> Thank you, Eric Thanks to you too Bill. Always looking for ways to improve things. I don't know exactly when I'll get around to doing this. If someone else wants to jump in on it, they're more than welcome. Please let me know if you want to work on it though, so we don't duplicate efforts. > Best regards, > Bill > > > On 11/23/06, *Eric Shubes* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: > > I'm glad to see that we're thinking along the same lines. > > I'm pretty good with bash. Not as good with perl, but I think I can > read it > well enough to translate what you're doing into bash. I'll have a > look at it > when I get a chance. It would help me out a bit if you could give me a > couple examples of what the script needs to do (from the user > standpoint). > I'm guessing that shortening the output is all that qmlog might need > to do. > > FWIW, there is a tai64nlocal program included in the daemontools-toaster > package that converts the time to a readable format. I'll have to > see what > you're doing to shorten things, but I'm guessing that sed or cut > might fit > the bill (no pun intended). > > Thanks! > -- -Eric 'shubes' --------------------------------------------------------------------- QmailToaster hosted by: VR Hosted <http://www.vr.org> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
