Ignore:
Timestamp:
Aug 8, 2017, 11:12:58 AM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
0.5, app-cordova, debian/bullseye, debian/jessie, master
Children:
24d4504
Parents:
581a6b2
Message:

gnuboat daemon is now using a logging directory instead of the nmea log file as an option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/python/bin/gnuboat

    r581a6b2 r8dee742  
    4141rrdfile = "/var/lib/gnuboat/log-webservice.rrd"
    4242shutdownfile = "/var/spool/gnuboat/shutdown.request"
    43 logfile = "/var/log/gnuboat-nmea1983.log"
     43logdir = "/var/log/gnuboat"
     44nmeaLogFile = "nmea0183.log"
    4445logperiod = 2
    4546displayperiod = 5
    … …  
    113114    print "  -l --logperiod         Time in seconds to update the logs"
    114115    print "  -d --displayperiod     Timein seconds to update the display"
    115     print "  -o --output            File where the NMEA1983 log is stored"
     116    print "  -o --output            Directory where the log files are stored (e.g. the NMEA0183 log files)"
    116117
    117118
    … …  
    121122    global logperiod
    122123    global displayperiod
    123     global logfile
     124    global logdir
     125    global nmeaLogFile
    124126    global nmeafile
    125127
    … …  
    144146            displayperiod = argument
    145147        elif option in ("-o", "--output"):
    146             logfile = argument
     148            logdir = argument
    147149        else:
    148150            assert False, "unhandled option"
    … …  
    175177
    176178    try:
    177         nmeafile = open(logfile, 'a', 0)
     179        nmeafile = open("%s/%s" % (logdir, nmeaLogFile), 'a', 0)
    178180    except IOError as error:
    179181        print "Could not open the logfile: %s" % error
Note: See TracChangeset for help on using the changeset viewer.