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 ➜ SMAUG ➜ SMAUG coding ➜ Log help

Log help

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


Pages: 1 2  

Posted by Arsen   (44 posts)  Bio
Date Wed 07 Aug 2002 12:43 AM (UTC)
Message
I cant figure out how to get the logging to work, it says in the MS-DOS window that it is logging, but when I go to the log folder, the only file there is "empty", what should I do? I want to keep the logs so that I can look at them later. HELP! thanks.

Arsen
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 07 Aug 2002 01:50 AM (UTC)

Amended on Wed 07 Aug 2002 01:51 AM (UTC) by Nick Gammon

Message
I think that is part of the startup shell script. Logging is done to stdout and stderr, and under Unix you would normally redirect the output to a file. eg. something like this:


../src/smaug > ../log/my_log_file.txt


The above redirects stdout but not stderr. I'm not sure if that will do. To redirect both, try this:


../src/smaug &> ../log/my_log_file.txt


This is similar to what is in the startup script. Similar but not identical, perhaps because of variations between the shells ...


set port = 4000
set logfile = ../log/$index.log
# Record starting time
date > $logfile
date > ../area/boot.txt

# Run SMAUG.
../src/smaug $port >&! $logfile


If you are not running under Cygwin, just try simple redirection:


../src/smaug > ../log/my_log_file.txt

- Nick Gammon

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

Posted by Arsen   (44 posts)  Bio
Date Reply #2 on Wed 07 Aug 2002 02:34 AM (UTC)
Message
could you please say that in english? lol
Top

Posted by Kain   USA  (43 posts)  Bio
Date Reply #3 on Fri 09 Aug 2002 12:23 AM (UTC)
Message
I've had a long day, so this may or may not answer your question but...

I'm using version of Smaug compiled for windows and I have two directories (log and logs) that have nothing in them. But when I go into my system directory and open up bugs.txt, there some information in there
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 09 Aug 2002 02:39 AM (UTC)
Message
Quote:

could you please say that in english? lol


OK, how you you currently start SMAUG?

Do you have a command (DOS) window, and do something like this:


cd c:\smaug\area
..\src\smaug


If so, just change it to:


cd c:\smaug\area
..\src\smaug > ..\log\my_log_file.txt


What "redirect" means is "send the output to", so you are sending the stuff that normally appears in the window, to a file.

- Nick Gammon

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

Posted by Arsen   (44 posts)  Bio
Date Reply #5 on Thu 24 Apr 2003 02:02 AM (UTC)
Message
I STILL cannot get my logfile to work, I have tried everything you said, but nothing works
Top

Posted by Arsen   (44 posts)  Bio
Date Reply #6 on Thu 17 Jul 2003 03:05 AM (UTC)
Message
I still have never gotten it to "send the output" to the logfile. My mud runs fine but nothing is added to the file.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #7 on Thu 17 Jul 2003 05:25 AM (UTC)
Message
Do you see the messages on the screen?

- Nick Gammon

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

Posted by Garaelb   (54 posts)  Bio
Date Reply #8 on Wed 23 Jul 2003 12:40 PM (UTC)
Message
I have a similar problem -

I don't use cygwin - and to start SMAUG I click an icon on my win98 desktop.

My smaug.exe is not in the AREA subdir it is in the main SMAUG dir. along with a couple of txt files and SmaugGrux.exe

I looked in my log folder and all I see is empty 0KB - I have show all file types and all hidden files marked but this empty doesn't have a file extension.

if you need more info than what I have provided let me know - but my log file doesn't work either.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #9 on Wed 23 Jul 2003 09:56 PM (UTC)
Message
You need to redirect stderr. In plain English this means type:


smaug /run 2> log/smauglog.txt


I tried that and it works. In the log subdirectory will now be a file smauglog.txt.

- Nick Gammon

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

Posted by Garaelb   (54 posts)  Bio
Date Reply #10 on Wed 23 Jul 2003 11:49 PM (UTC)
Message
here is exactly what I typed form the DOS command prompt in windows 98Se

C:\smaug /run 2> log/smauglog.txt

what that returned was

SMAUG1.4a
Usage is :-
Smaug -runs as a service, or stand alone
Smaug /run -runs stand alone
Smaug /start -starts this service
Smaug /stop -stops this service
Smaug /install -installs this service
Smaug /remove -removes or un-installs this service
Smaug /status -displays the status of this service
Smaug /help -displays information on this service

C:\smaug>

I checked the log subdir and it was still empty 0kb


Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #11 on Thu 24 Jul 2003 03:53 AM (UTC)

Amended on Thu 24 Jul 2003 03:54 AM (UTC) by Nick Gammon

Message
Hmm - I see. It works under NT. :)

See this page, it describes the problem ...


http://home.att.net/~myitpro/support.htm


(search for "stderr" on that page)

Basically the problem is that we want to redirect stderr (standard error output) but can't under Windows 95/98.

That page has links to small programs that will solve the problem. I haven't tested it, but it looks exactly what you want.

- Nick Gammon

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

Posted by Arsen   (44 posts)  Bio
Date Reply #12 on Thu 24 Jul 2003 04:29 AM (UTC)
Message
It's still not working, I typed exactly what you told me to (except I added the necessary address for the smaug file) and nothing happened, the mud didn't even start.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #13 on Thu 24 Jul 2003 04:43 AM (UTC)
Message
Did you download one of the helper files I mentioned above? What did you type? (It would be different when using them).

- Nick Gammon

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

Posted by Arsen   (44 posts)  Bio
Date Reply #14 on Thu 24 Jul 2003 04:45 AM (UTC)
Message
nevermind, I just got it figured out with basically what you told me to do. I checked the file that was supposed to be the log and found out that it was starting the mud, just on no port, so what I typed was:
../src/smaug 3600 /run 2> ../log/log.txt &

thanks Nick
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.


55,387 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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.