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.
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:
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
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.
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
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.
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 &
Quote: stdin, stdout, and stderr are simply file pointers, and can be redirected on
dos or unix. there is nothing magic about them that prevents redirection. the
fact that the shell (sh or csh on unix, command.com on dos) does not do this
for you does not prohibit you from doing it yourself. below is the code to a
simple shell which redirects any of these file pointers before executing an
arbitrary command. "redirect -i myin -o myout -e myerr foo arg1 arg2" will
execute the dos command "foo arg1 arg2" with stdin redirected from file myin,
and stdout and stderr redirected to files myout and myerr, respectively. so
information is not lost, myout and myerr are opened for appending, rather
than overwriting. this works on dos or unix.
/*
** redirect -- feed line to shell with stdin/stdout/stderr redirected
**
** usage -- redirect [-i newin] [-o newout] [-e newerr] command
**
** executes command via the shell, but redirects stdin/stdout/stderr first.
** stdout/stderr are appended, not overwritten.
*/
so on my win98SE system
if I type from a dos prompt
C:\redirect -e c:\smaug\log\smauglog.txt
My log files will start working as they are suppose to?
Naturally you need to type the command in the directory where the command actually is, or have it in your path. So, you probably need to do something like this:
c:
cd \smaug
c:\redirect\redirect.exe -e c:\smaug\log\smauglog.txt smaug.exe
You don't have to type that in every time, put it in a batch file.
And I can now actually see all the little eight-legged freaks running around in the code. naturally you know this means there are going to be more questions later on the nature of these horrible little creatures ;-) But for now I'm jumping in my seat with glee as this is working now. As we say in the game HUZZAH NICK!!!