@@ -0,0 +1,1262 @@
+__author__ = 'Ryan'%0A%0Aimport os%0Aimport posixpath%0Aimport socket%0Afrom boto import connect_s3%0Aimport datetime%0A%0Aconnection = connect_s3()%0Abucket = connection.get_bucket('vikinggame-logs')%0A%0A# This is imperfect, since IPs will be reused. but hopefully the timestamp combined with the IP is sufficient%0Amy_id = socket.gethostbyname(socket.gethostname())%0A%0A%0Afor d, dirs, files in os.walk('/opt/vikinggameserver/logs/'): #   development/port/log%0A    log = None%0A    core = None%0A    for f in files:%0A        if f.endswith('.core'):%0A            core = f%0A%0A        if f.endswith('.log'):%0A            log = f%0A%0A    if log is not None:%0A        remainder, port = os.path.split(d)%0A        remainder, branch = os.path.split(remainder)%0A        now = str(datetime.datetime.utcnow())%0A%0A        core_switch = 'nocrash'%0A        if core is not None:%0A            core_switch = 'crash'%0A            corekeyname = posixpath.join('logs', branch, core_switch, my_id, port, 'core')%0A            corekey = bucket.new_key(corekeyname)%0A            corekey.set_contents_from_filename(os.path.join(d, core))%0A%0A        logkeyname = posixpath.join('logs', branch, core_switch, my_id, port, now, 'log')%0A        logkey = bucket.new_key(logkeyname)%0A        logkey.set_contents_from_filename(os.path.join(d, log))

Add harvester script