Metraipolis › archive › dc_b2700e7badb4

Towards Automatically Pruning Logging Code with Coding Agents: How Far Are We? — arXiv:2610.04716

Source
arXiv
Original
https://arxiv.org/abs/2610.04716
License (as archived)
CC0-1.0
Archived
2026-10-06T05:26:23.702Z
SHA-256 of the archived text
76597f85c4170aa58d096e3900631a042e3de14a2d1d71fda0c8360f95d057a8
Stable URL of this page
https://metraipolis.com/documento/dc_b2700e7badb4

How to cite

Towards Automatically Pruning Logging Code with Coding Agents: How Far Are We? — arXiv:2610.04716 — arXiv, https://arxiv.org/abs/2610.04716 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_b2700e7badb4 (Metraipolis archive dc_b2700e7badb4, sha256 76597f85c4170aa58d096e3900631a042e3de14a2d1d71fda0c8360f95d057a8)
BibTeX
@misc{dcb2700e7badb4,
  title = {Towards Automatically Pruning Logging Code with Coding Agents: How Far Are We? — arXiv:2610.04716},
  howpublished = {arXiv},
  url = {https://arxiv.org/abs/2610.04716},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_b2700e7badb4; sha256 76597f85c4170aa58d096e3900631a042e3de14a2d1d71fda0c8360f95d057a8},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv, https://arxiv.org/abs/2610.04716. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Logging code supports debugging, monitoring, and software maintenance, but excessive logging can add noise, impose runtime overhead, and obscure diagnostic information. While prior research has extensively studied logging code generation and modification, logging removal remains comparatively underexplored. In this paper, we study developer logging removal practices and explore the use of coding agents for this task. We extract and manually validate logging removal cases from Python and Java repositories and derive 10 removal patterns and 11 removal reasons that characterize how and why logging code was removed in real-world software changes. We further construct LogRem, a dataset of 387 real-world cases covering direct logging statement removal, logging infrastructure removal, and logging replacement. We evaluate four coding agents with multiple model settings and compare their outputs with accepted real-world changes. Although 95.6% to 100.0% of outputs pass validity checks, only 11.1% to 19.6% remove the same logging code as the corresponding real-world change while preserving unrelated code. Agents differ through missed removals, extra removals, and unrelated code edits, with substantial variation across logging removal categories and trajectories. Execution cost varies widely, but higher cost does not consistently yield closer alignment. Commit messages and developer discussions provide the largest alignment gains, while taxonomy guidance consistently reduces runtime. Overall, our study establishes logging removal as a distinct software maintenance task and shows that reliable automation depends on accurately determining removal scope while preserving necessary code. To the best of our knowledge, this is the first study to examine logging code removal from this perspective.

Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.AI, nuovi lavori del giorno).
Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2610.04716 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-06T05:24:05.905Z dalla pagina https://arxiv.org/list/cs.AI/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).