Logging with timestamps

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Logging with timestamps

Post by Slayd » Fri May 10, 2013 5:52 pm

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?

Jor'Mox
Posts: 1099
Joined: Wed Apr 03, 2013 2:19 am

Re: Logging with timestamps

Post by Jor'Mox » Fri May 10, 2013 6:20 pm

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.

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Re: Logging with timestamps

Post by Slayd » Fri May 10, 2013 7:56 pm

Thanks for your help. I will look there

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Re: Logging with timestamps

Post by Slayd » Fri May 10, 2013 8:33 pm

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.

Jor'Mox
Posts: 1099
Joined: Wed Apr 03, 2013 2:19 am

Re: Logging with timestamps

Post by Jor'Mox » Fri May 10, 2013 9:26 pm

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.

User avatar
Vadi
Posts: 4711
Joined: Sat Mar 14, 2009 3:13 pm

Re: Logging with timestamps

Post by Vadi » Fri May 10, 2013 11:55 pm

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).

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Re: Logging with timestamps

Post by Slayd » Sat May 11, 2013 6:22 pm

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.

User avatar
Proxy
Posts: 27
Joined: Sun May 08, 2016 4:57 pm

Re: Logging with timestamps

Post by Proxy » Thu Nov 24, 2016 4:10 pm

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 :)

User avatar
Proxy
Posts: 27
Joined: Sun May 08, 2016 4:57 pm

Re: Logging with timestamps

Post by Proxy » Sun Nov 27, 2016 9:47 am

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())

User avatar
Vadi
Posts: 4711
Joined: Sat Mar 14, 2009 3:13 pm

Re: Logging with timestamps

Post by Vadi » Fri Apr 28, 2017 4:41 am

@palino thanks for the improvement!

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 9 guests