Logging

Place for people to discuss public servers, and also for admins to lay out the details of their servers
Post Reply
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Logging

Post by I_Died_Once » Sat Apr 30, 2005 11:57 am

I know there are a few threads dealing with logging, but I cannot find exactly what I need. So I turn to y'all!

OK, I know that -d enables debugging information. That seems to be the fast answer to most logging questions here. That does not suffice. I run my server from a Konsole (Suse 9.2 w/ KDE) and everything that transpires scrolls through the display, and I really need records saved to a text file so I can review things later. I need to keep better record of stuff like -what admin changed what variable, what user said what (I know you can log all conversations...how?)

Again, when I run my server, its from a console, and it only displays but so much information. Any and all help is appreciated. Thanks.
...This has been a recording.

Guest

Post by Guest » Sat Apr 30, 2005 12:22 pm

Yeah. I woul be interested in this too...
Just something that records everything (that comes up in terminal (Mac OS 10.3.8)) in soem kind of text file...

User avatar
sbgodin
Private First Class
Private First Class
Posts: 50
Joined: Mon Dec 27, 2004 11:33 pm
Location: France
Contact:

Logging

Post by sbgodin » Sat Apr 30, 2005 3:11 pm

I'm running under Linux. Here's how I do :

I first let a @-observer to log what it is said because bzfs -d -d -d does not say who's writing, it only gives the slot.

The output of bzfs is redirected to a file while the bzfs runs in the background, here's how I do :

Code: Select all

bzfs -d -d -d -d -d \
-vars $JEU/vars \
-world $JEU/world.bzw \
...
$ARGS \
>> $LOGS &
Secondly, I can use cat log to see the log, or tail. The best remain this : tail -f log which shows the file as cat but will also display new line as soon as they are added to the file.[/code]
Christophe HENRY - France

User avatar
Yertman
Private First Class
Private First Class
Posts: 15
Joined: Fri Feb 25, 2005 5:04 am
Location: Wisconsin

Re: Logging

Post by Yertman » Mon May 02, 2005 5:39 am

Hello,

I am also running bzfs under SuSE 9. This is the command I use to start the server, put the process into the background, and save my log files:

Code: Select all

yertman@fluffy:~>bzfs -conf summer.conf >> bz.log 2>> bzerr.log &
The '>>' tell the shell to append the commands standard output to the file named bz.log. The '2>>' tells the shell to append the commands standard error to the file named bzerr.log. The '&' at the end tells the shell to put the process into the background and return me to the command prompt. If I used '>' instead of '>>' the output would overwrite the log file each time the command was run instead of appending it.

I usually ssh in, run this command and log out, or I open a terminal locally run the command and log out. I don't have any problems with this however I suspect a real Linux guru would have a more correct way to do it. If there are any Linux gurus about please let me know about this. :)

I am using the option -dd in my config file. This does provide a callsign with all chat entries so you can see what has been said very nicely by using grep like this:

Code: Select all

grep  ]: bz.log
The bracket and the colon "[:" is the pattern you want grep to match. This pattern seems to be unique to chat messages in the log file so grep filters through the whole log file and prints out all the chat messages including commands.

If you wanted to see if one of your admins had been doing anything interesting you can grep the log file for their call sign and see anything they have said and all commands they have run.


Have a great day!
Yertman

Sir_Pants
Private First Class
Private First Class
Posts: 194
Joined: Mon Mar 28, 2005 2:41 am
Location: SOMEwhere in WA

Post by Sir_Pants » Mon May 02, 2005 5:42 am

just use the search command in the file instead of reading/ scrolling through hundreds of lines of text
MONKEYPANTS.COM
Image

User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3249
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe » Mon Jul 11, 2005 12:44 pm

What's the easiest way to do it with windows?

User avatar
Lone Wolf
Private First Class
Private First Class
Posts: 24
Joined: Thu Jun 02, 2005 1:16 pm

Post by Lone Wolf » Mon Jul 11, 2005 2:42 pm

-banfile filename
Specifies the name of a file where bzfs will store the banlist. It will load the banlist from this file when it starts (if the file exists), and write the banlist back to the file when someone gets banned or unbanned. If this option isn't given the banlist will not be saved.


you would put it under your conf file

like c:\mybanfile.txt

it has to be the ip addresses i think to ban the guy
Image

User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3249
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe » Mon Jul 11, 2005 2:51 pm

Banfile has nothing to do with logging. Banfile is for keeping your Banned IPS otherwise when you restart the server, the person you banned can just come back because his ip was erased from ban when server shut down. Logging would be for something like viewing chat messages, what people typed, and who picked up flags and things.

User avatar
cosmos
Private First Class
Private First Class
Posts: 76
Joined: Thu Dec 23, 2004 7:18 pm
Location: Los Angeles
Contact:

Post by cosmos » Mon Jul 11, 2005 5:32 pm

ducatiwannabe wrote:What's the easiest way to do it with windows?
Not using windows would be the easiest way. :)

User avatar
Tropican8
Private First Class
Private First Class
Posts: 312
Joined: Fri Mar 18, 2005 11:51 pm
Location: As close to the grove as you can get

Post by Tropican8 » Wed Jul 27, 2005 7:03 am

ducatiwannabe wrote:What's the easiest way to do it with windows?
> and >> also work in windows. Try:

Code: Select all

bzadmin "Logger@(servername)" >>filename

User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1403
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom
Contact:

Post by Spazzy McGee » Wed Jul 27, 2005 2:23 pm

does anyone have a way to log stuff on OS X? (I'm running tiger, and i run my servrs with terminal)
"Life is what happens to you while you're busy making other plans." - John Lennon

User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite » Wed Jul 27, 2005 4:36 pm

In OS X you use the same command that Tropican8 said. Only I use one > instead of >>.
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com

User avatar
sbgodin
Private First Class
Private First Class
Posts: 50
Joined: Mon Dec 27, 2004 11:33 pm
Location: France
Contact:

file redirection

Post by sbgodin » Wed Jul 27, 2005 4:48 pm

As Meteorite says, OS X is like Linux as it's in the same familly : the unix based operating systems.

">" means that the file will be emptied if exists or created otherwise.
">>" as ">" but the output will be endless added to the file.
Christophe HENRY - France

User avatar
G-MAN
Private First Class
Private First Class
Posts: 85
Joined: Fri Aug 05, 2005 10:12 pm
Location: Location, Location, Location. This house has it all.

Ok

Post by G-MAN » Sat Sep 17, 2005 4:51 pm

I enter

Code: Select all

bzadmin "Logger@(servername)" >>filename
to access the log files right. Now does the filename need to be in .txt or what do i put it in?

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Sat Sep 17, 2005 5:40 pm

Put in whatever you want for filename.

Now, Masterbot will have a built-in logger that produces stuff like this:

Code: Select all

200;RPG has joined the server from 127.0.0.1
300;[RPG]:Hello, world!
300;[RPG]:this is a message to my teamies
300;[RPG]:this is a messages to my admins
300;[RPG]:I'm going to kill myself now
100;RPG killed self
300;[RPG]:/masterbot logdump
300;[RPG]:/masterbot dumplogs
300;[RPG]:/masterbot logsdump
300;[RPG]:/shutdownserver
050;12:35 PM

User avatar
G-MAN
Private First Class
Private First Class
Posts: 85
Joined: Fri Aug 05, 2005 10:12 pm
Location: Location, Location, Location. This house has it all.

I know

Post by G-MAN » Sat Sep 17, 2005 5:51 pm

so can it be .txt and open it up fron note pad?

User avatar
khazhyk
Private First Class
Private First Class
Posts: 1400
Joined: Sun Feb 06, 2005 5:40 pm
Location: Somewhere over there.
Contact:

Re: I know

Post by khazhyk » Sat Sep 17, 2005 5:53 pm

G-MAN wrote:so can it be .txt and open it up fron note pad?
it can be .txt, .log, .blah anything you want, just to see the logs you will need to open the file in a text editor window
Image

User avatar
G-MAN
Private First Class
Private First Class
Posts: 85
Joined: Fri Aug 05, 2005 10:12 pm
Location: Location, Location, Location. This house has it all.

I need a bzadmin to record the log files?

Post by G-MAN » Sat Sep 17, 2005 6:01 pm

Do i need a bzadmin to record what was done and said? If i do the code im using is kinda entering the bzadmin log right? :|

User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Re: I need a bzadmin to record the log files?

Post by A Meteorite » Sat Sep 17, 2005 6:37 pm

G-MAN wrote:Do i need a bzadmin to record what was done and said? If i do the code im using is kinda entering the bzadmin log right? :|
If you use bzfs you can also log, but it will get you lots of useless junk, so stick to bzadmin unless you want to see everything (including PMs!).

I recommend .log on a Mac because when it opens up it updates in real-time. :!:
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com

User avatar
G-MAN
Private First Class
Private First Class
Posts: 85
Joined: Fri Aug 05, 2005 10:12 pm
Location: Location, Location, Location. This house has it all.

OK

Post by G-MAN » Sat Sep 17, 2005 6:43 pm

So just stick with what the bzadmin got right?

Thanks

User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Re: OK

Post by A Meteorite » Sat Sep 17, 2005 6:54 pm

G-MAN wrote:So just stick with what the bzadmin got right?

Thanks
Yep, nothing to it. :wink:

And you're welcome. :)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com

temporal distraction
Sergeant
Sergeant
Posts: 250
Joined: Wed Jan 05, 2005 3:12 pm

Post by temporal distraction » Wed Oct 12, 2005 2:12 pm

Rather bump this old topic than start a new one...

I've just started logging on a BZF 1.10 server I'm admin on and have a couple more questions.

I'm using OSX 10.4 terminal and used the ">>logfile.log" (no quotes) to keep track of everthing. But when I use that option, no output goes to the terminal window, only to the text file. Is that normal?

I log in with another window (and not using the ">>file" option I can see everything public. But I cannot scroll back past the current window. I know the text is there because I can change the size of the text in the window and more of the "past" text appears.

Also, in the text file there's a bunch of extra text at the start of each line.

Code: Select all

[1B[1;22r[22;1H
[1;24r[18;1H*** 'Horse' blew myself up.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'Mik Biatch' left the game.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'ekilsman' destroyed by 'rave'.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'hakim' joined the game.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'rave' destroyed by 'hakim'.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'hakim' destroyed by 'pelegs'.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'hakim' destroyed by 'rabbit'.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'rabbit' destroyed by 'pelegs'.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'Horse' left the game.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'rave' left the game.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'ekilsman' left the game.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'rabbit' destroyed by 'pelegs'.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'hakim' blew myself up.
[1B[5B[1;22r[22;1H
[1;24r[18;1H*** 'rabbit': paused.
[
Also normal and just an annoyance?

TIA

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Wed Oct 12, 2005 8:54 pm

No, that exta text isn't normal. I'd seek help about that.

Post Reply