Page 1 of 2

Logging with timestamps

Posted: Fri May 10, 2013 5:52 pm
by Slayd
I am using mudlet 2.1. I want to use the built-in logger with timestamps recorded.

I have clicked on the timestamp button and can see the timestamps in my main window, but when I check the log, the timestamp information is missing?

I haven't been able to find a place to set an option for this and have searched this site and the mudlet manual.

What am I missing?

Re: Logging with timestamps

Posted: Fri May 10, 2013 6:20 pm
by Jor'Mox
If you look in the wiki, the example given for how to use the prefix function displays a time stamp. As these will be written on your screen in a manner similar to text from the game, they should be logged.

Re: Logging with timestamps

Posted: Fri May 10, 2013 7:56 pm
by Slayd
Thanks for your help. I will look there

Re: Logging with timestamps

Posted: Fri May 10, 2013 8:33 pm
by Slayd
I tried to use the prefix approach. It looks good on the screen but does not go to the log.

It appears the logger logs a line as soon as received from Achaea - before, not after, any mudlet processing to change the appearance of the line for the screen.

Re: Logging with timestamps

Posted: Fri May 10, 2013 9:26 pm
by Jor'Mox
It would seem that you aren't the only person having problems with this, but it seems that some of the dev team believes this problem is fixed, as can be seen here. You could try bringing it up to Heiko.

Re: Logging with timestamps

Posted: Fri May 10, 2013 11:55 pm
by Vadi
There is some confusion, the prefix is not a prefix to the MUD output - it's a separate thing that can be toggled on and off (the timestamps from the (i) button). To get timestamps within your logs, you can adjust your prompt to show them (either via your curing system or using os.date/os.time directly to echo).

Re: Logging with timestamps

Posted: Sat May 11, 2013 6:22 pm
by Slayd
Timestamps on each line of the log (ie each line that originated from the mud) and not just the prompt was a feature in MUSHClient that was useful for me when I was looking at combat logs. Vadi's suggestion gets me closer to what I was used to.

It may have been a design decision in mudlet not to have more processing with each log line in the interest of speed.

Re: Logging with timestamps

Posted: Thu Nov 24, 2016 4:10 pm
by Proxy
To get timestamps within your logs, you can adjust your prompt to show them (either via your curing system or using os.date/os.time directly to echo).
How exactly do you do this? The new logging system is great. Just wandering how to get those timestamps attached to it.

Thanks :)

Re: Logging with timestamps

Posted: Sun Nov 27, 2016 9:47 am
by Proxy
So this is the solution to the problem. It was given to me by Vadi and he advised me to put it up here so anyone else that has the same issue can see it.
Do you know how to make a trigger? If not, watch the triggers tutorial Then, just put this into it:
Code: [show] | [select all] lua
echo(os.date())
You could also go for:
Code: [show] | [select all] lua
prefix(os.date())

Re: Logging with timestamps

Posted: Fri Apr 28, 2017 4:41 am
by Vadi
@palino thanks for the improvement!

Do you think you could submit it as a pull request on https://github.com/Mudlet/Mudlet/pulls ?