dmroeder / pylogix

Read/Write data from Allen Bradley Compact/Control Logix PLC's
Apache License 2.0
598 stars 182 forks source link

BUG Fix for logging values to a text file #168

Closed GitHubDragonFly closed 3 years ago

GitHubDragonFly commented 3 years ago

Short description of change

BUG Fix

Types of changes

What is the change?

What does it fix/add?

Fixes a BUG that caused the log file entries be scattered.

Test Configuration

TheFern2 commented 3 years ago

What is the reason to create a csv data file, and having the extension as txt? Would it make sense to just create a csv from the start?

Not sure if this is what you intended but header row now only has date column:

Date / Time, 
2021-03-30/06:47:33.725992, True, 545437493
2021-03-30/06:47:34.231560, True, 545437493
2021-03-30/06:47:34.739083, True, 545437493
2021-03-30/06:47:35.244650, True, 545437493
GitHubDragonFly commented 3 years ago

The txt extension is generally acceptable for everybody. Some users might not be using csv at all and could possibly get confused with the extension.

The log header should be fixed now.

GitHubDragonFly commented 3 years ago

Logging values only makes sense for the initial list of tags being logged.

If the tags are changed then the current log file should be renamed or moved to a different location. Otherwise, the newly logged values will not match the existing header.

TheFern2 commented 3 years ago

Makes, sense. Thanks for the bug fix.