Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUSHclient
➜ General
➜ Logs not changing file daily
Logs not changing file daily
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Eurotool
(14 posts) Bio
|
Date
| Fri 11 Sep 2015 01:16 AM (UTC) |
Message
| Hi,
My current logging option is set to log automatically to this file:
C:\Program Files (x86)\MUSHclient\logs\%N_%Y-%m-%d.html
However, all it does is log to the same file it created a week ago, everyday. It doesn't create a new one each day.
Am I missing something here? How can I fix this?
Thank you very much,
Eurotool | Top |
|
Posted by
| Nick Gammon
Australia (23,057 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 11 Sep 2015 06:37 AM (UTC) Amended on Fri 11 Sep 2015 06:38 AM (UTC) by Nick Gammon
|
Message
| The logging option you mention controls the filename, when the log file is opened. However if it stays open for a week, then everything is appended to the same file.
What you need to do is have a timer that runs at 00:01 a.m., which closes the current log file and opens a new one.
From memory, if you open a log file with an empty filename (with OpenLog) it uses the parameters in your logging configuration.
So make a timer, which run at just after midnight, and sends to script, which does something along the lines of:
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Eurotool
(14 posts) Bio
|
Date
| Reply #2 on Fri 09 Oct 2015 01:53 AM (UTC) |
Message
| Thank you, but this doesn't apply the headers (preambles) to the logs. They all lack line breaks and proper formatting (HTML). Am I missing a command? | Top |
|
Posted by
| Daniel P
USA (97 posts) Bio
|
Date
| Reply #3 on Fri 09 Oct 2015 03:20 AM (UTC) |
Message
| CloseLog help mentions that it will append the postamble to the file, and that "this is inconsistent with what OpenLog does." So no, you're not missing anything.
What about using WriteLog() combined with GetInfo(11) immediately after calling OpenLog? | 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.
16,060 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top