Pith. sign in

REVIEW 3 cited by

Go Static: Contextualized Logging Statement Generation

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2402.12958 v1 pith:QSJ6PYXL submitted 2024-02-20 cs.SE

classification cs.SE
keywords loggingscloggerstatementstaticcontextualizedapproachgenerationlanguage
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Logging practices have been extensively investigated to assist developers in writing appropriate logging statements for documenting software behaviors. Although numerous automatic logging approaches have been proposed, their performance remains unsatisfactory due to the constraint of the single-method input, without informative programming context outside the method. Specifically, we identify three inherent limitations with single-method context: limited static scope of logging statements, inconsistent logging styles, and missing type information of logging variables. To tackle these limitations, we propose SCLogger, the first contextualized logging statement generation approach with inter-method static contexts. First, SCLogger extracts inter-method contexts with static analysis to construct the contextualized prompt for language models to generate a tentative logging statement. The contextualized prompt consists of an extended static scope and sampled similar methods, ordered by the chain-of-thought (COT) strategy. Second, SCLogger refines the access of logging variables by formulating a new refinement prompt for language models, which incorporates detailed type information of variables in the tentative logging statement. The evaluation results show that SCLogger surpasses the state-of-the-art approach by 8.7% in logging position accuracy, 32.1% in level accuracy, 19.6% in variable precision, and 138.4% in text BLEU-4 score. Furthermore, SCLogger consistently boosts the performance of logging statement generation across a range of large language models, thereby showcasing the generalizability of this approach.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. AL-Bench: A Benchmark for Automatic Logging

    cs.SE 2025-02 conditional novelty 7.0 of 10

    A new benchmark with static and runtime evaluation shows state-of-the-art automatic logging tools produce many uncompilable or semantically misaligned log statements.

  2. AdaptiveLog: An Adaptive Log Analysis Framework with the Collaboration of Large and Small Language Model

    cs.SE 2025-01 conditional novelty 5.0 of 10

    An adaptive log analysis framework that routes uncertain SLM predictions to an LLM with error-case prompts, improving accuracy and cutting LLM cost by about 73%.

  3. Empowering AIOps: Leveraging Large Language Models for IT Operations Management

    cs.SE 2025-01 conditional novelty 4.0 of 10

    Tool-using LLM agents can resolve many Kubernetes IT operations tasks; GPT-4o led advanced multi-tool tasks while Anthropic models led simple ones, and Mixtral 8x22B failed with hallucinations.

Pith tools