Bots/Instrumentation
From charlesreid1
notes
Categorizing bots:
- currently, we have logging capacity
- what we need is a database module for logging
- logging functionality may need fixing...
approach:
- passing full information to logging object
- logging object decides what to do
- want to be able to say, dump to log file, dump to database
- enable log file dumping and set a log dump file
- enable database dumping and set connection information
code
https://git.charlesreid1.com/charlesreid1/apollospacejunk
https://git.charlesreid1.com/charlesreid1/rainbow-mind-machine
def _tweet(self,twit):
"""
Private method.
Publish a twit.
"""
# call twitter api to tweet the twit
try:
# tweet:
#stats = self.t.statuses.update(status=twit)
self.t.statuses.update(status=twit)
msg = self.timestamp_message(">>> Tweet was successful: %s"%(twit))
logging.info(msg)