Skip to content

Commit 93377cb

Browse files
committed
add logfile support
1 parent 4adf745 commit 93377cb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

inosync.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ def sync(self):
6868
return
6969
args = [config.rsync, "-ltrp", "--delete"]
7070
args.append("--bwlimit=%s" % config.rspeed)
71+
if config.logfile:
72+
args.append("--log-file=%s" % config.logfile)
7173
if "excludes" in dir(config):
7274
for exclude in config.excludes:
7375
args.append("--exclude=%s" % exclude)
@@ -160,6 +162,9 @@ def load_config(filename):
160162
if config.edelay < 1:
161163
raise RuntimeError, "event delay needs to be greater than 1"
162164

165+
if not "logfile" in dir(config):
166+
config.logfile = None
167+
163168
if not "rsync" in dir(config):
164169
config.rsync = "/usr/bin/rsync"
165170
if not os.path.isabs(config.rsync):

sample_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@
3232
# realtime side of things)
3333
#edelay = 10
3434

35+
# rsync log file for updates
36+
#logfile = /var/log/inosync.log
37+
3538
# rsync binary path
3639
#rsync = "/usr/bin/rsync"

0 commit comments

Comments
 (0)