Home/Support/Support Forum/XBee Event logging, creating CSV file.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

XBee Event logging, creating CSV file.

0 votes

I am logging change of state values within my Python program... I am using XBee ZigBee. The python XBee documentation provides Event Log documentation. It gives code and general concept about loggers, handlers, and formatters. However, looking elsewhere (YouTube etc.) I have simply used a logging.basicConfig method at the top of my code. like so:

logging.basicConfig(filename='test.csv', level=logging.INFO, format='%(asctime)s:%(levelname)s:%(message)s')

and then whenever I want to log variable I just put a logging.info (or any particular level, debug,warning, etc) after the variable.

so my concern/question is, what am I missing? I didnt really use any of the XBee python log event approach as provided by the XBee documentation.. I used the simple approach as clarified above. There must be a catch, too easy. Any problems with what am I doing? am I missing anything? Did I successfully create a CSV file?

like.. I can change the filename='test.csv' to filename='test.monkeys' and then another file is opened called test.monkeys.. is this a monkeys file type? My IDE recognizes the .csv one I made and prompts me to use a csv plugin.. but not for the .monkeys file.. no monkeys plugin lolol :D..

so anyways.. did I really create a csv file or did I just call something a name that ends in ".csv"? no clue

thanks :)
asked Jul 21 in 3rd Party Python and API development in other Languages by edunn106 New to the Community (14 points)
recategorized Jul 21 by mvut

Please log in or register to answer this question.

1 Answer

0 votes
This would not be an XBee issue but more of a Python issue.
answered Jul 21 by mvut Veteran of the Digi Community (12,791 points)
well, to make it more XBee specific... when I log specified event info of my XBee device network.. not only do I get the logging of the specified event, but also many many lines of unwanted logging information, from opening the local device to the I/O configuration of all the pins on all the xbe modules in the network. So, xbee built in method includen built in logging, yay or nay?

What documentation are you referring to? What is the link to it?
I think you need to take a closer look at the logging function offered and how it works. Also what code is needed for it to work properly.
oh, absolutely. apply this to all things.