|
From: | aixtools |
Subject: | Re: Feature Request re: syslog and bashhist |
Date: | Wed, 12 Aug 2015 12:31:55 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 |
On 2015-08-10 10:19 PM, Chet Ramey wrote:
Basically, I had not noticed it was there. It was only because I was at a customer who said they had customized their version years ago that I started searching for information about "bash and syslog". Most of those hits were about using "fc" to add commands via the external syslogger - and these are the oldest, so the first, read top hits, that I got back. One of the replies mentioned the "top" include file.On 8/9/15 1:37 PM, aixtools wrote:Hi, Via google I came across the define named config-top.h:/* #define SYSLOG_HISTORY */ Changing it (manually) to config-top.h:#define SYSLOG_HISTORY Adds syslog statements such as: Aug 9 16:52:55 x064 user:info syslog: HISTORY: PID=262242 UID=0 ls -ltr Request #1 Add a ./configure variable, e.g., --with-syslog_historyI will think about this, but I am inclined not to do it. It's easy enough to enable for those few user who want to do so.
This is actually, for me, the first compelling reason to switch shells for "what is provided" to what I must be certain is added.
In short, having it included in ./configure simply give it much more visibility - and perhaps adoption.
I try to make minimal changes. There are perhaps many other 'things' to think about here. e.g., I thought about the syslog facility and level as a configureable, but have decided against - as someone could divert the log to an unmonitored facility - defeats the purpose. However, maybe being able to specify what gets logged via a define (order of arguments, length, etc) might be "nice".Request #2 At the request of a bash user on AIX I made the following change to make the syslog output "standardized" to AIX format for many applications so that the output looks like this: Aug 9 17:30:12 x064 user:info syslog: bash[454682]: UID=0: ls -ltrThe better way to do this is to use openlog(). I will add the necessary pieces to call openlog with the shell name as the identifier and LOG_PID as the default value for the log options.
But, openlog() - I'll readup, but I expect that may be what "AIX" applications are using already to get "that" layout.
Many thanks for your consideration!
Chet
[Prev in Thread] | Current Thread | [Next in Thread] |