Raised This Month: $23 Target: $400
 5% 

[log] Source Dedicated Server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-26-2011 , 11:41   [log] Source Dedicated Server
Reply With Quote #1

[log] Source Dedicated Server
- Some helpful cvars if you didn't know
Sry bad english and this troll post, maybe this help some one in something
log
sv_log_onefile
sv_logflush
sv_logbans
sv_logecho
sv_logsdir
sv_logfile
sv_rcon_log
mp_logdetail

con_logfile
con_timestamp


I have added these cvars in ...cfg/autoexec.cfg only,
reason for this I get more log info about server launch and all log cvars are in same place.

  • log Top
    Code:
    "log"
     - Enables logging to file, console, and udp < on | off >.
    Srcds not start log info by default, you need enable.
    Either log 1 or log on to start log file. (Disable log 0 or log off)

    Typing only log in server input you get status where all places server show log message.
    Code:
    ] log 
    Usage:  log < on | off >
    currently logging to: file, console, udp
    file = sv_logfile 1, save server info in log file
    console = sv_logecho 1, echo log info to the server console (spam text server console screen)
    udp = logaddress_list, list remote hosts where send log info (HLSW, stats system ?)


  • sv_log_onefile Top
    Code:
    "sv_log_onefile" = "0" 
     archive
     - Log server information to only one file.
    Disabled, it create new log file every map change!

    Whit this you can reduce creating bunch of log files, very usefull.
    When enabled, it log all info in one file after server launch (...logs/l1026000.txt)
    When server quit, reboot or crash and start again, it log info in new file (on same day ...logs/l1026001.txt)
    Log file size can grow over 5MB in one day, it's more better if server reboot automatically every day.
    You can keep trace what happen that whole server run time.


  • sv_logflush Top
    Code:
    "sv_logflush" = "0"
     archive
     - Flush the log file to disk on each write (slow).
    When disabled, you not get server info in "real time".
    Seems server collect info and when it grows over 33KB it write in log file.
    Now if server suddenly shutdown/crash, you maybe lost about 500 lines info.

    Enabled, it write info in log file "real time", this could take performance from server!


  • sv_logbans Top
    Code:
    "sv_logbans" = "0"
     archive
     - Log server bans in the server logs.
    When enabled, it log executed bans by banid, addip, removeid and removeip.
    L 10/26/2011 - 17:14:52: Banid: "<><STEAM_0:1:123><>" was banned "for 20.00 minutes" by "Console"
    L 10/26/2011 - 17:20:55: Removeid: "<><STEAM_0:1:123><>" was unbanned by "Console"
    L 10/26/2011 - 17:16:16: Addip: "<><><>" was banned by IP "for 20.00 minutes" by "Console" (IP "30")
    L 10/26/2011 - 17:21:43: Removeip: "<><><>" was unbanned by "Console" (IP " 30. 0. 0. 0")

    Ok, have you thought what happen when execute banned_user.cfg when sv_logbans 1 ?? And every map change (server.cfg) ??
    You get full of in log file for nothing.

    To avoid this, add in ...cfg/autoexec.cfg
    exec banned_user.cfg
    exec banned_ip.cfg
    log on // Turn log after permament bans
    Add in ...cfg/server.cfg
    writeid
    writeip

  • sv_logecho Top
    Code:
    "sv_logecho" = "1"
     archive
     - Echo log information to the console.
    Depends you, do you want see these log info in server console output.
    Disable, reduce message spam in server console screen.


  • sv_logsdir Top
    Code:
    "sv_logsdir" = "logs"
     archive
     - Folder in the game directory where server logs will be stored.
    Destination folder where save log files


  • sv_logfile Top
    Code:
    "sv_logfile" = "1"
     archive
     - Log server information in the log file.
    When disabled, stop write log files.
    And server keep send log info either server console and/or remote host


  • sv_rcon_log Top
    Code:
    "sv_rcon_log" = "1"
     - Enable/disable rcon logging.
    Log rcon actions
    L 10/26/2011 - 181:07: rcon from "xx.xxx.x.xx:50989": command "status"


  • mp_logdetail Top (all game mods maybe not have this)
    Code:
    "mp_logdetail" = "0" min. 0.000000 max. 3.000000
     game
     - Logs attacks.  Values are: 0=off, 1=enemy, 2=teammate, 3=both)
    This log attacks depend mode. Some stats system use this, not sure...
    L 10/26/2011 - 17:00:59: "Troy<3><BOT><TERRORIST>" attacked "Henry<2><BOT><CT>" with "ak47" (damage "34") (damage_armor "4") (health "66") (armor "95") (hitgroup "stomach")
    L 10/26/2011 - 17:01:00: "Troy<3><BOT><TERRORIST>" attacked "Henry<2><BOT><CT>" with "ak47" (damage "27") (damage_armor "3") (health "39") (armor "91") (hitgroup "left arm")
    L 10/26/2011 - 17:01:00: "Troy<3><BOT><TERRORIST>" attacked "Henry<2><BOT><CT>" with "ak47" (damage "27") (damage_armor "3") (health "12") (armor "87") (hitgroup "left arm")

    Better leave it off
Ok, those cvars above was for server log system.
There is another type log information from server, it's about console output.
Maybe help find reason for server crash or other things for those who not see server console screen.
  • con_logfile Top
    Code:
    "con_logfile" = ""
     - Console output gets written to this file
    Type file name then server start save all console output
    con_logfile "my_file.txt"
    To stop write, leave empty con_logfile ""


  • con_timestamp Top
    Code:
    "con_timestamp" = "0"
     - Prefix console.log entries with timestamps
    This include time stamp front of console output.

You found more cvars when type in console if you want.
find log
__________________
Do not Private Message @me

Last edited by Bacardi; 10-27-2011 at 09:31.
Bacardi is offline
Arcy
Senior Member
Join Date: Feb 2010
Location: Wroclaw, Poland
Old 10-26-2011 , 12:53   Re: [log] Source Dedicated Server
Reply With Quote #2

There should be an introduction thread, where all the usefull cvars would've been explained(cv_,sv_,sm_,mp_,cl_) or maybe a wiki, yes I know there are plenty of wikis, but they are all outdated - see for yourself.
__________________

Arcy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-26-2011 , 17:04   Re: [log] Source Dedicated Server
Reply With Quote #3

Quote:
Originally Posted by Arcy View Post
There should be an introduction thread, where all the usefull cvars would've been explained(cv_,sv_,sm_,mp_,cl_) or maybe a wiki, yes I know there are plenty of wikis, but they are all outdated - see for yourself.
There are a lot of cvars, though. And occasionally, cvars get renamed. For example, tf_show_voice_icons is now mp_show_voice_icons.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
djded
Member
Join Date: Jul 2019
Location: Czech Republic
Old 11-11-2019 , 12:22   Re: [log] Source Dedicated Server
Reply With Quote #4

Hello �� can someone told me, how to write logs for kicked players?
djded is offline
meltov
New Member
Join Date: Jun 2024
Old 06-16-2024 , 08:40   Re: [log] Source Dedicated Server
Reply With Quote #5

Hi there.

Can anybody tell me why my HLDS doesn't print hitgroup in logs as it shown above?

I tried various hlds.exe version patches. Both protocols 47 and 48.

Also I have installed amxmodx with statsxx.amx


Thx all.
meltov is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 06-16-2024 , 12:33   Re: [log] Source Dedicated Server
Reply With Quote #6

...this is SRCDS section, CS:S, DOD:S, TF2, L4D

HLDS run hl1 mods like CS, HL:DM, DOD etc. etc.
Those mods are maybe missing that feature, I have not looked.
You may get it work with custom AMXMODX plugin.

Here amx section
https://forums.alliedmods.net/forumdisplay.php?f=3
Bacardi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode