Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Timestamps in Logs

Timestamps in Logs

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Satoshi   (1 post)  Bio
Date Sun 12 Jan 2003 04:25 AM (UTC)
Message
How would I add a timestamp in a log that I'm creating. I'm trying to create a log of just things people gossips, and then adding a timestamp to the log file when the gossip is added. Is this possible? If so, what should I add to my trigger to get a timestamp in my log file?

Thanks in advance for any help.
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #1 on Sun 12 Jan 2003 06:14 AM (UTC)
Message
You can call a script instead of sending to a log and have it do:
sub Logit (tname, output, wilds)
  world.writelog now & " " & output
end sub

That should log the line 'and' add the date and time to each line. That should work.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 12 Jan 2003 10:46 PM (UTC)
Message
A simpler method is to change the "line preamble" in the logging configuration. Click on the button labelled "?" to see the various codes you can put in the line preamble, including date and time.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,913 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.