UDP Logging (#1997)

This implements UDP Logging with GELF.
It will allow full text search over all the logs and attributes sent over GELF to the log server.
This commit is contained in:
Werner
2017-04-01 23:47:00 +03:00
committed by skull132
parent a07a459f9e
commit 59e7377798
168 changed files with 602 additions and 414 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
world.log << "### ZAS SHUTDOWN"
message_admins("ZASALERT: Shutting down! status: [air_master.tick_progress]")
log_admin("ZASALERT: Shutting down! status: [air_master.tick_progress]")
log_admin("ZASALERT: Shutting down! status: [air_master.tick_progress]",level=1)
air_processing_killed = TRUE
air_master.failed_ticks = 0
+3 -3
View File
@@ -293,7 +293,7 @@ var/global/datum/controller/radio/radio_controller
/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null)
if (!filter)
filter = RADIO_DEFAULT
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
//log_debug("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
var/list/obj/devices_line = devices[filter]
if (!devices_line)
devices_line = new
@@ -301,8 +301,8 @@ var/global/datum/controller/radio/radio_controller
devices_line+=device
// var/list/obj/devices_line___ = devices[filter_str]
// var/l = devices_line___.len
//log_admin("DEBUG: devices_line.len=[devices_line.len]")
//log_admin("DEBUG: devices(filter_str).len=[l]")
//log_debug("DEBUG: devices_line.len=[devices_line.len]")
//log_debug("DEBUG: devices(filter_str).len=[l]")
/datum/radio_frequency/proc/remove_listener(obj/device)
for (var/devices_filter in devices)
+14 -4
View File
@@ -19,7 +19,6 @@ var/list/gamemode_cache = list()
var/log_emote = 0 // log emotes
var/log_attack = 0 // log attack messages
var/log_adminchat = 0 // log admin chat messages
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
var/log_pda = 0 // log pda messages
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
var/log_runtime = 0 // logs world.log to a file
@@ -254,6 +253,11 @@ var/list/gamemode_cache = list()
var/api_rate_limit = 50
var/list/api_rate_limit_whitelist = list()
//UDP GELF Logging
var/log_gelf_enabled = 0
var/log_gelf_ip = ""
var/log_gelf_port = ""
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/T in L)
@@ -358,9 +362,6 @@ var/list/gamemode_cache = list()
if ("log_adminchat")
config.log_adminchat = 1
if ("log_adminwarn")
config.log_adminwarn = 1
if ("log_pda")
config.log_pda = 1
@@ -795,6 +796,15 @@ var/list/gamemode_cache = list()
if("api_rate_limit_whitelist")
config.api_rate_limit_whitelist = text2list(value, ";")
if("log_gelf_enabled")
config.log_gelf_enabled = text2num(value)
if("log_gelf_ip")
config.log_gelf_ip = value
if("log_gelf_port")
config.log_gelf_port = value
else
log_misc("Unknown setting in configuration: '[name]'")