Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Wed Nov 12, 2008 10:39 pm   

Logging Issues
 
Ok, I hate to keep referencing to zMUD, but this worked perfectly fine there. No matter how many times I logged on/off for the day or lost connection and reconnected...I would always be logging to my log file of the day...looks like so:


Code:

#TRIGGER {{Recovering character.|Moving to starting location.|You recover from link dead...}} {#log tarken%time( "mmddyy")~.txt}



It seems to only log the first login of the day or randomly here and there...any ideas?
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Nov 12, 2008 10:43 pm   
 
Stick a #say in there and see if it's the trigger not firing that's the problem, or if it's the #log command. If it's the trigger, fix the pattern. If it's the #log command, try using explicit concatenation with the %concat function.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Wed Nov 12, 2008 10:46 pm   
 
I know for sure that it fires, one of my other commands in it creates a group when I login and it does that for sure. I'll test out using %concat in a bit.
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Wed Nov 12, 2008 11:08 pm   
 
Regardless of how I use it, it claims to be writing to:

Appending to log: C:\Program Files\CMUD\bat\tarken111208.txt

which is the correct file...but nothing is being written to the logfile.
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Nov 12, 2008 11:28 pm   
 
Make sure all the folders already exist and that CMUD has write permission to them (which it won't if you're on Vista, for example). The #log command doesn't give an error when it can't open the file for whatever reason.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Wed Nov 12, 2008 11:32 pm   
 
The folder exists and contains some logfiles already, and I'm using XP. And I've never had issue with permissions before to write...I'd assume natrually CMUD also has the ability to write to its own files.
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
mikeC130
Apprentice


Joined: 03 Jul 2006
Posts: 110

PostPosted: Thu Nov 13, 2008 12:45 am   
 
Is there a chance that the folder somehow get set to read only, during a backup or file maintenance?

Edited: too many 'somehows' in one sentence...
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Thu Nov 13, 2008 1:59 am   
 
Still no luck :/
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Nov 13, 2008 2:47 am   
 
Delete or rename the existing log file, then type the "#LOG tarken111208.txt" manually on the command line to open the file, then use

#WRITELOG "This is a test"

to write a line to the file, then close it using #LOG and exit CMUD and check the file. If it says it is opening the file, then I can't see any way for #WRITELOG not to write to the file unless it's a file permission problem.

Are you using WinXP SP3? In general, newer versions of Windows do not like programs writing to files in the "Program Files" area. You really should start installing CMUD using the %DOCUMENTS% default installation option for Data Files. The routine that write to the LOG files use a higher level textfile driver, compared to stuff like the *.PKG database files, so maybe there is something new in SP3 that is preventing the higher-level file I/O routines from writing to the Program Files area.

That's all I can think of. I'm not having any problems with my log files here with WinXP SP2 or Vista using the %DOCUMENTS% data file locations.
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Nov 13, 2008 2:03 pm   
 
I know that my log file starts writing to file on connection and works every single time. Why do you need it to write based off a certain pattern?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Thu Nov 13, 2008 2:12 pm   
 
Well interesting enough, it seemed to only update the file after I closed CMUD...or the day after (I'm sure that's not the case). I look at yesterdays log file and it is no longer 132kb like it was the whole time doing this, but the 3423 kb it should have been. I just find this odd since I'm used to being able to open the log file, while its writing to it, to go back and check things that are past my buffer.
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Thu Nov 20, 2008 11:26 pm   
 
Yes this took care of it after reinstalling to the main C: then into documents, etc. Seems like even SP2 had a problem with writing to the Program Files directory, which is a good antivirus tactic I suppose. I'll give this a few more days of testing then call it officially resolved. :)
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Fri Nov 21, 2008 3:57 pm   
 
Still no dice, the same thing seems to happen each time...it just...stops...

Recovering character.
Appending to log: C:\Documents and Settings\Princess\My Documents\My Games\CMUD\bat\tarken112108.txt
Appending to log: C:\Documents and Settings\Princess\My Documents\My Games\CMUD\bat\tarken112108.txt
<---------^---------> Loc: Deep Forest in western Lucentium
| | Exits: north, south, east, west, northeast, northwest,
| | southeast, southwest
| hhh |
| FFFFFFFFF | The deep forest is awakening to new life - the winter
| FFFFFFFFF | has gone and the forest waits eagerly for the summer.
< bFbF*FFFF > Tall broadleaved trees have small, pale-green leaves on
| FFFFFFFFF | them. Here and there an ancient spruce towers even
| FFFFFFFFF | higher than the mightiest of oaks and poplars.
| FFF | Visibility here is next to non-existent, and although
| | the undergrowth is quite scarce, hiding places are
uncommand l
| | plentiful. A deposit of magnesium ore is embedded in
<---------v---------> the ground.

large polar bear [
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net