|
elektrisk Novice
Joined: 06 May 2008 Posts: 38
|
Posted: Mon Nov 17, 2008 8:33 am
Logging.. |
I like to keep logs when I play on the MUD that I do, and I have a function to automatically start logging when I log on. However, if I close cMUD then open it/log on, it overwrites the logging I had and starts logging anew in that same file. Is there a way so that the logging just keeps stacking and makes one huge text file? If not, what would you suggest I do to keep logs of everything?
Also, is there a way I can prevent some things from being logged? For example, when you log in the MUD, it says:
Code: |
Connected to host necromium.com
Appending to log: C:\Users\Elektrisk\Documents\My Games\CMUD\Necromium\Necro6.txt
Do you wish to use ANSI colors? (Y/n):
Welcome to...
_ _ __________________________________________________________________________
_ _____ |: ____|: _ |: _ |: _ |: _ _ |: |: | |: _ _ |
/| | |. |___|. |___|. |___|. | |. | | |. |. | |. | | |
| | | | ____| |__/| |__/| | | | | | | | | | | |
| | | | |___| |___| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
| | | |_______|_______|___| | |_______|___|___|___|___|_______| | | |
| |___|___|______/_______/___/ |/_______/___________/___/_______/|___|___|___|
|/_______/ .: N E C R O M I U M :. |/___________/
-<kMidas>-
Special thanks to BoneZ, Demigo, and Treestump for their extra efforts!
By what name do you wish to be known on Necromium? |
Then:
Code: |
...
;::::; - necromium.com 4000 -
;::::; :; - 66.206.164.164 4000 - ;:::::' :;
;:::::; ;.
,:::::' ; d88b Where death is a way of life...
::::::; ; d8888b
;:::::; ; d888888l.
,;::::::; ;' d88888888b --------| NECROMiUM |--------
;:::::::::`. ,,,;. d88P 988888b | Based on CircleMUD 3.0, |
.';:::::::::::::::::;, d88P `98888b | Created by Jeremy Elson |
,::::::;::::::;;;;::::;, d88P `9888b | |
;`::::::`'::::::;;;:;::: ,#d88P 9888b | A derivative of DikuMUD |
:`:::::::`;::::::;;::: ;::#88P 9888b | (GAMMA 0.0) |
::`:::::::`;:::::::: ;::::#8P 9888 | Created by Hans Henrik |
`:`:::::::`;:::::::;::::::#P PiC by 888 | Staerfeldt, Katja Nyboe |
:::`:::::::`;; ;:::::::::## Timrek & 88 | Tom Madsen, Michael |
::::`:::::::`;::::::::;:::# Treestump 88 | Seifert, and Sebastian |
`:::::`::::::::::::;'`:;::# 8 | Hammer |
`:::::`::::::::;' d88P `:# -----------------------------
::::::`:::::;' d88P `#
Press RETURN to enter the world of Necromium: |
Obviously this is unneeded, and just takes up more space.
Thanks! |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Mon Nov 17, 2008 12:42 pm |
Take the "new" out of your log command and it should append just fine.
The gag the into you can take each individual line and do a #gaglog to it, I've been working on a trigger that gags everything between the first and last lines, using them as the triggers but haven't gotten it to work yet. |
|
|
|
hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: Mon Nov 17, 2008 12:54 pm |
Make a trigger as shown in the following XML view:
Code: |
<trigger name="OpenLog" priority="1" id="202">
<pattern>Press RETURN to enter the world of Necromium~:</pattern>
<value>Logfile = "C:\Users\Elektrisk\Documents\My Games\CMUD\Necromium\Necro_"%time(yyyy-mm-dd_hh-nn);#log @Logfile</value>
</trigger>
|
This creates a new date-and-time-stamped log every time that CMUD detects the pattern "Press RETURN to enter the world of Necromium:" .
Make sure the C:\Users\Elektrisk\Documents\My Games\CMUD\Necromium\ directory has been created before you start using this trigger. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Mon Nov 17, 2008 1:26 pm |
Actually, to make things even more simpler (so you don't have to look for that particular time frame when searching through logs), change the above to:
Code: |
<trigger name="OpenLog" priority="1" id="202">
<pattern>Press RETURN to enter the world of Necromium~:</pattern>
<value>#LOG %concat("Necro_",%time(yyyy-mm-dd),".txt")</value>
</trigger> |
What this effectively does is logs it on a day-by-day basis and doesn't create an unnecessary variable. It'll append to the existing log instead of overwriting it, too.
As far as certain things not showing up in the logs, you can take a look at #GAGLOG and #WRITELOG, two fairly new commands. :)
Charneus |
|
|
|
elektrisk Novice
Joined: 06 May 2008 Posts: 38
|
Posted: Tue Nov 18, 2008 12:22 pm |
Awesome, it works :=) Thanks a lot!
EDIT: It appears there is no entry for #gaglog, nor #writelog in the cMUD helpfile / on the site. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Nov 18, 2008 2:11 pm |
Interesting. The commands have been around for a couple of months. I'm surprised there isn't a helpfile for either of them.
In short, #WRITELOG allows you to write certain lines to a logfile. #GAGLOG gags certain lines from a logfile. Do a search in the forums to learn more about them.
Charneus |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|