$OpenBSD: patch-common_logger_py,v 1.1 2012/05/29 10:21:56 ajacoutot Exp $

Prepend the short hostname to the log line to have a compliant syslog(3)
entry allowing remote logging based on the hostname.

--- common/logger.py.orig	Tue May 29 12:14:41 2012
+++ common/logger.py	Tue May 29 12:18:58 2012
@@ -18,10 +18,12 @@
 
 import syslog
 import os
+import socket
 
 def openlog():
 	name = os.getenv( 'LOGNAME', 'unknown' )
-	syslog.openlog( "backintime (%s)" % name )
+	host = socket.gethostname().split('.')[0]
+	syslog.openlog( "%s backintime (%s)" % ( host, name ) )
 
 def closelog():
 	syslog.closelog()
