arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

[breaking] `daemon --debug-file` will overwrite the log file instead of appending to it

Open cmaglie opened this issue 3 years ago • 3 comments
trafficstars

Please check if the PR fulfills these requirements

  • [x] The PR has no duplicates (please search among the Pull Requests before creating one)
  • [x] The PR follows our contributing guidelines
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)
  • [x] UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce? daemon --debug-file log.txt will overwrite log.txt instead of appending to it

What is the current behavior? daemon --debug-file log.txt will append on log.txt

What is the new behavior? daemon --debug-file log.txt will overwrite log.txt

Does this PR introduce a breaking change, and is titled accordingly? Yes, UPGRADING.md has been updated

cmaglie avatar Jun 17 '22 09:06 cmaglie

I'm not too fond of it, and IDE2 does not need it.

On the IDE2 side, the gRPC log files preference should be a path to a folder. IDE2 should create a new log file per app session.

I've never seen an app/tool updating log files by erasing the content from the previous session.

kittaakos avatar Jun 17 '22 10:06 kittaakos

@kittaakos it depends on what we want to achieve on the IDE. I believe a single file being overwritten every time is enough because otherwise, the CLI would log tons of lines and as a user, I wouldn't want to find a folder with a 10GB log file.

But this is only my opinion. In any case, with the change made in this PR we can still achieve what you are saying (that is: having a log file per session), we'd just need to name every file differently.

Let's discuss this in a separate thread because whether or not we'll have multiple log files in the IDE, it's not a CLI matter.

AlbyIanna avatar Jun 17 '22 10:06 AlbyIanna

I wouldn't want to find a folder with a 10GB log file.

Then don't enable it.

kittaakos avatar Jun 17 '22 10:06 kittaakos

Closing as won't fix.

cmaglie avatar Sep 21 '22 12:09 cmaglie