Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008333opensim[REGION] OpenSim Corepublic2018-07-10 06:462018-07-18 01:59
Assigned ToUbitUmarov 
PlatformLinuxOperating SystemUbuntuOperating System Version12.10 Server
Product Versionmaster (dev code) 
Target Versionmaster (dev code)Fixed in Versionmaster (dev code) 
Summary0008333: [Patch] Allow OpenSimConsoleHistory to have Date/time
DescriptionThis patch allows the OpenSimConsoleHistory to have a Date/Time when a command was typed in the LocalConsole
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Script Engine
Mono VersionNone
Attached Filesdiff file icon patch.diff [^] (623 bytes) 2018-07-10 06:46 [Show Content]
patch file icon 0001-Adding-new-Command-logging-to-OpenSim.patch [^] (4,825 bytes) 2018-07-13 07:05 [Show Content]

- Relationships

-  Notes
BillBlight (developer)
2018-07-10 07:13

Does this screw up when you hit the up arrow to recall the commands ?
BillBlight (developer)
2018-07-10 08:41

Yes this patch does screw up the recall of command history with the up/down arrow ..

Just an FYI , console history is NOT a log file, it is much like the history file in linux , it is there to provide the ability to recall your last commands .
Jak Daniels (reporter)
2018-07-10 10:26

consolehistory.txt is like .bash_history.txt. It provides a persisent and recallable history of commands between instance restarts. It should not have date/times!!
UbitUmarov (administrator)
2018-07-10 10:31

Thanks watcher64+x and Jak for point out the issue.
Sorry Fly-Man-, think we need to let this go
Thanks anyway!
Sheera Khan (reporter)
2018-07-10 13:04
edited on: 2018-07-10 13:07

One might argue though that the ~/.bash_history allows for the inclusion of the date:
HISTTIMEFORMAT sets the format of the date-prefix. If this env-Variable exists the timestamp will be included in the ~/.bash_history file. (man 1 bash).

sheera@schleppi:~> tail -n 1 ~/.profile
export HISTTIMEFORMAT="%Y%m%d-%H:%M - "
sheera@schleppi:~> history | tail -n 3
 1005 20180710-22:02 - ls -l /
 1006 20180710-22:03 - tail -1 ~/.profile
 1007 20180710-22:03 - history | tail -n 3

But that only affects the output of the history command. Editing your commands on the commandline works the same as before :-)

tampa (reporter)
2018-07-10 13:09

Probably be easier to simply log commands specifically in the OpenSim.log rather than just their output. I use screens logging ability to log simulator activity, it shows everything that happens, including some stacktraces the logging may not catch.
BillBlight (developer)
2018-07-10 13:09

You are very correct , if this patch included trimming the time back off when you recall the commands then it could be useful to some.
BillBlight (developer)
2018-07-10 13:10

Or add a second log file for console commands ...
Fly-Man- (developer)
2018-07-13 06:46

Added a new patch [CommandLogging.diff] with changes that make the CommandLog a seperate file to store the commands in.
tampa (reporter)
2018-07-13 07:28

There is a segmentation going on here that I don't think is helpful. I think it would be better to place the command history together with the normal OpenSim.log rather than another separate file, this would make it easier to directly see the effect a command might have had. With two separate files one would need to reference them both to find what command may have caused an issue.

A simple [Console]: Executing user command "command" would be the better option I think.

Also, it would probably be wise to revisit the way both the consolehistory and logging handle the entry of the passwords required for loading and saving IAR files, ideally the parameter should not be logged nor entered into the console history.
Fly-Man- (developer)
2018-07-13 07:39

@Tampa The idea with the date/time is to be able to see back what exactly happened at what moment in time.

For some grid owners who have a team of people it's the way so they can check at what time which command was issued (giving the blame to the person who was working at that moment)
tampa (reporter)
2018-07-13 07:42

Again, this fragments the logging environment more and it would far easier to blame someone for a wrongly executed with the actual error or issue being logged right after aka in the same file, simply adding it to the OpenSim.log before executing the command itself.

With two files one has to crossreference them against each other to exactly pinpoint what was executed and when along with the result.
UbitUmarov (administrator)
2018-07-13 16:49

sorry Fly-Man- not using your code, just the idea with my own bugs.
Thanks anyway :)

with option ConsoleHistoryTimeStamp set to true, the console history file will have timestamps.
tampa (reporter)
2018-07-13 16:54

Have you worked around command recall causing the timestamps to appear?
UbitUmarov (administrator)
2018-07-13 16:55

they do not appear on console, only file
Fly-Man- (developer)
2018-07-13 18:03

The patch you did looks perfect as well.

- Issue History
Date Modified Username Field Change
2018-07-10 06:46 Fly-Man- New Issue
2018-07-10 06:46 Fly-Man- Status new => assigned
2018-07-10 06:46 Fly-Man- Assigned To => UbitUmarov
2018-07-10 06:46 Fly-Man- File Added: patch.diff
2018-07-10 06:47 Fly-Man- Status assigned => patch ready
2018-07-10 07:13 BillBlight Note Added: 0032748
2018-07-10 08:41 BillBlight Note Added: 0032749
2018-07-10 10:26 Jak Daniels Note Added: 0032750
2018-07-10 10:31 UbitUmarov Note Added: 0032751
2018-07-10 13:04 Sheera Khan Note Added: 0032753
2018-07-10 13:05 Sheera Khan Note Edited: 0032753 View Revisions
2018-07-10 13:07 Sheera Khan Note Edited: 0032753 View Revisions
2018-07-10 13:09 tampa Note Added: 0032754
2018-07-10 13:09 BillBlight Note Added: 0032755
2018-07-10 13:10 BillBlight Note Added: 0032756
2018-07-13 06:45 Fly-Man- File Added: CommandLogging.diff
2018-07-13 06:46 Fly-Man- Note Added: 0032781
2018-07-13 07:02 Fly-Man- File Deleted: CommandLogging.diff
2018-07-13 07:05 Fly-Man- File Added: 0001-Adding-new-Command-logging-to-OpenSim.patch
2018-07-13 07:28 tampa Note Added: 0032784
2018-07-13 07:39 Fly-Man- Note Added: 0032788
2018-07-13 07:42 tampa Note Added: 0032790
2018-07-13 16:49 UbitUmarov Note Added: 0032794
2018-07-13 16:54 tampa Note Added: 0032795
2018-07-13 16:55 UbitUmarov Note Added: 0032796
2018-07-13 18:03 Fly-Man- Note Added: 0032797
2018-07-13 18:03 Fly-Man- Status patch ready => patch feedback
2018-07-18 01:59 Fly-Man- Status patch feedback => resolved
2018-07-18 01:59 Fly-Man- Fixed in Version => master (dev code)
2018-07-18 01:59 Fly-Man- Resolution open => fixed
2018-07-18 01:59 Fly-Man- Status resolved => closed

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker