Skip to content

Commit

Permalink
Minor tweaks to logging output. Set to INFO instead of DEBUG. Ready f…
Browse files Browse the repository at this point in the history
…or Release of 1.0
  • Loading branch information
danstoner committed Jan 30, 2015
1 parent ce2b592 commit 694f083
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dailymile_export_to_tsv.py
Expand Up @@ -13,11 +13,12 @@

#TODO convert these to runtime parameters

# dailymile user name
# Change from "INFO" to "DEBUG" to log everything
logging.basicConfig(level=logging.INFO)

# change this to your dailymile user name
dm_user="danstoner"

# log everything for now
logging.basicConfig(level=logging.DEBUG)


# Earliest date entry to fetch in format YYYY-MM-DD
Expand Down Expand Up @@ -149,6 +150,9 @@ def writerows(self, rows):
# The ids look like sequential numbers, sorting by id may go a long way towards getting the entries in chronological order
sorted_keys = sorted(entry_dict.keys())

logging.info("Total number of entries: "+str(len(sorted_keys)))
logging.info("Writing to output file: " + outputfile)

# write the data to csv
with open(outputfile,"a") as f:
writer = UnicodeWriter(f,dialect='excel-tab')
Expand Down

0 comments on commit 694f083

Please sign in to comment.