Commands not being logged

Posted by Nick Gammon on Thu 17 Apr 2003 01:12 AM — 5 posts, 19,128 views.

Australia Forum Administrator #0
I am almost afraid to ask this, because I know it will kick up another storm, but here goes...

It seems that there is a bug in versions 3.36/3.37 where commands are not being logged. Now, the question is, if you type an alias, what do you expect to be logged (assuming you have a log file)?

* Nothing
* The alias you typed
* The command that the alias evaluated to (which actually got sent)
* Both

And, if the alias "omit from log" flag is set, what gets omitted?

* The alias you typed?
* The command that is sent?
* Both?
#1
The most basic answer seems to be: anything that appears on the screen should be logged unless it's specifically marked to omit from log(triggers/aliases)
Australia Forum Administrator #2
OK, if we go with that basic definition, why would someone want to set "omit from log" for an alias?

If the logging is a record of the session, they can already choose whether or not commands, in general, are logged. Why would you want to selectively omit a command from the log?

In version 3.34 and earlier, what appeared to be logged was the evaluated text (ie. what the alias sent) not the alias itself. It seems to me that a more accurate record of what you did would be to log what you typed, not necessarily what got sent.

Here is a proposal - what about having this as a rule:

If logging is on AND
If "logging commands" is on THEN ...

  • If you type a simple command it is logged.
  • If you type an alias and "echo alias" is on, the alias is logged (ie. what you actually typed).
  • If you type an alias and the alias "omit from log" is not on, the alias *output* is logged.

#3
I'd agree with that logic.
Australia Forum Administrator #4
Version 3.38 does it that way.