|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Mon May 02, 2011 9:14 pm
[Suggestion] Logged Timestamp Alteration |
One of the players of the MUD I play (Dark and Shattered Lands) has created a simple program which takes a log, reads the timestamps on it, and uses it to create a "real-time" recording of logs that can then be viewed by others. The idea has a lot of potential and could be expanded upon easily if he or others wanted to. However, the biggest downside to the set-up is that it requires time-stamped logs. Obviously the time-stamps are necessary for the reader to know when events happened, but, if one isn't reading the log in the viewer, they're going to see a lot of timestamp messages in front of lines. Some people like this, others don't, that's why timestamps are an option.
My suggestion is to have a way for timestamps to be hidden in HTML tags if timestamps are on and HTML logging is enabled. It wouldn't be done by default, but, would be allowed as an option. The benefit to this is that you could have a reader still see the timestamps by reading these "dud" tags, and thus play them out. However, if the log were opened or posted as an HTML page, you wouldn't ever see the timestamps as part of the log.
It would be possible to create a script which does something similar, but, it wouldn't necessarily be "simple" since there are various considerations to take into account (all sorts of color conversions and such, things the game does automatically for you as part of HTML logging that you would have to do manually through #WRITELOG). Additionally, scripts would not be able to compensate for the "write scrollback to log" feature which is rather important for those who do not log everything.
I'm not sure how much work such a feature would require, I'm sure a lot of testing would be involved to make sure it doesn't screw with logging in general, but I think it's a feature which could be well worth it down the road. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu May 19, 2011 5:58 pm |
Just bumping this up. I'd really like to see something that would allow this to be done easily. Otherwise I'll have to writelog every line and do stuff with ansi triggers, etc... !!!!
Alternatively, one might simply implement a way to have a constant line which is automatically appended to the beginning of every logged line and allow variables within that line so that one could implement timestamps if they wish. |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Thu May 19, 2011 6:26 pm |
No point in bumping it while Zugg is moving house and has no internet.
|
|
_________________ Taz :) |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu May 19, 2011 6:40 pm |
I haven't been following the forums the past week or two, so I didn't know! But part of bumping it is just to generate discussion. Aka, finding alternatives that don't require changes to CMUD and aren't an absolute pain in the butt, OR refining the suggestion to something which is easier to implement and/or has more functionality (such as the prefix suggestion).
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Thu May 19, 2011 7:14 pm |
These logs have already been made by you and you're posting them somewhere for public consumption and you're saying if timestamps are there they won't read the logs?
I'm thinking it won't be terribly difficult to process these logs before posting them. Can you provide a link to one of your timestamped html logs so I can take a look at it and see what I can come up with? |
|
_________________ Taz :) |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu May 19, 2011 8:00 pm |
Oh, no no.
The log I posted was something that someone else created (he does have a forum account here, so if he sees it, he can feel free to chime in).
However, his program requires timestamps to be enabled to work.
Problem-Solution
The major issue is that, a lot of people (myself included) find timestamps to be a rather ugly addition to logs. As such, we have one of two solutions:
1) Create two logs
2) Log timestamps in such a way that they can be "hidden"
Multi-Logs
The issue with #1 is that CMUD doesn't currently support multiple logging. As such, if you want a second log, you have to write to an outside file, and essentially have to design your own logger from scratch (a massive pain). This doesn't even factor in the limitations that CMUD has on writing to files (for location and such), all in all making the effort feel not worth it.
Logging Approach
ANSI/Txt
The best way then is to go with #2. With ANSI color logs, you can design an external program which can go through the log and remove timestamps. Or, you can use a notepad program which has some nice pattern-matching find+replace operations. However, this can be quite a lot of work, and beyond the means of anyone who isn't so heavy into scripting/programming to create their own programs to do such. (txt logs work the same way as ansi, just without color).
html
If you log in HTML, however, you can put the timestamps in a separate tag which will be ignored by browsers, but usable by webscripts. Thus, your log will be free of timestamps, still have color, and easily be transferable to rich text editors (in color) without the timestamps. However, those very same logs will be able to be read by these log parsers in order to run them in real-time.
Conclusion
From all of these suggestions, HTML logging with Timestamps seems to be the most effective way. Only the HTML method allows you to have one log which can be used in both a viewer and simply viewed normally without worrying about users having to deal with timestamps. Unfortunately, the HTML solution has problems as well. Namely, that, in order to get Timestamps in HTML tags we need to create our own HTML logging script which would use #WRITELOG to put a Timestamp at the beginning of every line. Because we have to use #WRITELOG, we would also have to have our script properly turn ANSI values into their HTML equivalents, etc... while possible, it's definitely a pain. If we could come up with some useful extension to CMUD's functionality though, then we can really improve the logging scene, which will not only help real-time logs, but also any future ideas that others might have. |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Thu May 19, 2011 9:26 pm |
In the same way you can remove the timestamps from an ANSI log with an external program you can create one that can embed the timestamps in a pretend tag for a HTML log. I was offering to write such a program that could be posted for download here. People could download and use this program to process logs before doing whatever, wherever for whomever.
|
|
_________________ Taz :) |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu May 19, 2011 11:10 pm |
You'll want to discuss it with the player behind the actual real-time log program. I might try to develop one at a future point, but I'm fine with using whatever standard the two of you develop, so long as it can be hidden inside of an HTML tag.
I do have my reservations about a third party program though. While it saves Zugg some work, obviously, it requires users to be appraised of an aware of the third party program, download it, and then use it for every log. While not awful, an alternative in CMUD is something which can be setup to work automatically, etc... |
|
|
|
Ardath Beginner
Joined: 17 Jan 2010 Posts: 20
|
Posted: Fri May 20, 2011 12:04 am |
I wrote a python script to convert a timestamped log into several formats (first it cleans out prompts/gtells and leaves only Arena text, then it makes another file where the timestamps are stripped, and also a third file where the HTML colors are stripped). That solves most of my log problems.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri May 20, 2011 12:06 am |
Well, this potential program would be looking to convert the timestamp format to a dud HTML tag which could then be read by your program, so as to conform with HTML logging and hiding the timestamps from the log itself in the process. I'd still prefer a CMUD method, but an available third party program would be a good start.
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Fri May 20, 2011 12:23 am |
There is no need for me to contact the player. Anyone wishing to use his web application to view a play back of their log file can provide the original log file.
Anyone wishing to view the log file as a normal html file in a browser could use the program I would write. |
|
_________________ Taz :) |
|
|
|
|
|