Do AI Coding Agents Log Like Humans? An Empirical Study
Youssef Esseddiq Ouatiti, Mohammed Sayagh, Hao Li, Ahmed E. Hassan

TL;DR
This empirical study analyzes how AI coding agents handle software logging, comparing their practices to humans and evaluating the influence of natural language instructions.
Contribution
It provides the first large-scale comparison of AI and human logging behaviors and assesses the effectiveness of explicit logging instructions.
Findings
Agents log less frequently than humans in most repositories.
Explicit logging instructions are rarely used and often ignored by agents.
Humans fix logging issues post-generation, acting as 'silent janitors'.
Abstract
Software logging is essential for maintaining and debugging complex systems, yet it remains unclear how AI coding agents handle this non-functional requirement. While prior work characterizes human logging practices, the behaviors of AI coding agents and the efficacy of natural language instructions in governing them are unexplored. To address this gap, we conduct an empirical study of 4,550 agentic pull requests across 81 open-source repositories. We compare agent logging patterns against human baselines and analyze the impact of explicit logging instructions. We find that agents change logging less often than humans in 58.4% of repositories, though they exhibit higher log density when they do. Furthermore, explicit logging instructions are rare (4.7%) and ineffective, as agents fail to comply with constructive requests 67% of the time. Finally, we observe that humans perform 72.5% of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
