116-java-logging

116-java-logging is a cursor rule for Cursor from alkoleft/platform-context-exporter. It costs 8,310 tokens per session, scanned A, original, MIT.

Guidelines for recording events and errors in Java applications using common logging tools and consistent severity levels.

In plain words
What is it for?
Use them when setting up Java logging, choosing log levels, handling exceptions, formatting output, protecting log data, or checking logging in tests.
Why use it?
They reduce unclear or noisy logs and help prevent passwords, personal data, or other sensitive information from being exposed.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when setting up Java logging, choosing log levels, handling exceptions, formatting output, protecting log data, or checking logging in tests.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/alkoleft/platform-context-exporter/116-java-logging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/alkoleft/platform-context-exporter

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 116-java-logging

README.md
[![agentmods](https://agentmods.dev/badge/rules/alkoleft/platform-context-exporter/116-java-logging/github.svg)](https://agentmods.dev/rules/alkoleft/platform-context-exporter/116-java-logging)
Your own site
<a href="https://agentmods.dev/rules/alkoleft/platform-context-exporter/116-java-logging"><img src="https://agentmods.dev/badge/rules/alkoleft/platform-context-exporter/116-java-logging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 116-java-logging

Your own site · 80×15
<a href="https://agentmods.dev/rules/alkoleft/platform-context-exporter/116-java-logging"><img src="https://agentmods.dev/badge/rules/alkoleft/platform-context-exporter/116-java-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,310 This file is loaded in full into every session.
When invoked 8,310 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.08310 $0.08310
Opus 5.5 $0.03324 $0.03324
Sonnet 5.5 $0.01662 $0.01662
Haiku 4.5 $0.00831 $0.00831

Measured 3mo ago against content hash f0089e9f57eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

116-java-logging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/116-java-logging.mdc · 811 lines

How it starts

The opening of the file, as written. The whole thing — 811 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Java Logging Best Practices

Effective Java logging involves selecting a standard framework (SLF4J with Logback/Log4j2), using appropriate log levels (ERROR, WARN, INFO, DEBUG, TRACE), and adhering to core practices like parameterized logging, proper exception handling, and avoiding sensitive data exposure. Configuration should be environment-specific with clear output formats. Security is paramount: mask sensitive data, control log access, and ensure secure transmission. Implement centralized log aggregation, monitoring, and alerting for proactive issue detection. Finally, logging behavior and its impact should be validated through comprehensive testing.

Implementing These Principles

These guidelines are built upon the following core principles:

  1. Standardized Framework Selection: Utilize a widely accepted logging facade (preferably SLF4J) and a robust underlying implementation (Logback or Log4j2). This promotes consistency, flexibility, and access to advanced logging features.
  2. Meaningful and Consistent Log Levels: Employ logging levels (ERROR, WARN, INFO, DEBUG, TRACE) deliberately and consistently to categorize the severity and importance of messages. This allows for effective filtering, monitoring, and targeted issue diagnosis.
  3. Adherence to Core Logging Practices: Follow fundamental best practices such as using parameterized logging (avoiding string concatenation for performance and clarity), always logging exceptions with their stack traces, never logging sensitive data directly (PII, credentials), and using correlation IDs (e.g., via MDC) for request tracing in distributed environments.
  4. Thoughtful and Flexible Configuration: Manage logging configuration externally (e.g., logback.xml, log4j2.xml). Tailor configurations for different environments (dev, test, prod) with appropriate log levels for various packages, clear and informative output formats (including timestamps, levels, logger names, thread info, and MDC data), and robust log rotation and retention policies.
  5. Security-Conscious Logging: Prioritize security in all logging activities. Actively mask or filter sensitive information, control access to log files and log management systems, use secure protocols for transmitting logs, and ensure compliance with relevant data protection regulations (e.g., GDPR, HIPAA).
  6. Proactive Log Monitoring and Alerting: Implement centralized log aggregation systems (e.g., ELK Stack, Splunk, Grafana Loki). Establish automated alerts based on log patterns, error rates, or specific critical events to enable proactive issue detection and rapid response.
  7. Comprehensive Logging Validation Through Testing: Integrate logging into the testing strategy. Assert that critical log messages (especially errors and warnings) are generated as expected under specific conditions, verify log formats, test log level filtering, and assess any performance impact of logging.

Read the full file on GitHub · 811 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 811 lines · 8,310 tokens per session scan A f0089e9f57eb

Subscribe to this mod's changes

116-java-logging is a cursor rule published in the GitHub repository alkoleft/platform-context-exporter (50 stars, last pushed 1y ago), licensed MIT. It adds 8,310 tokens to every session, about $0.0332 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

116-java-logging compared with cursor rules from other repositories

116-java-logging next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
116-java-loggingalkoleft/platform-context-exporterCursor rule501y agoMITA8,310Cursor
1c-extension-patternsDesko77/cursor-1c-skillsCursor rule786d agoMITA0Cursor
testing-patternsDesko77/cursor-1c-skillsCursor rule786d agoMITA0Cursor
1c77-specificsDesko77/cursor-1c-skillsCursor rule786d agoMITA0Cursor
integrationsDesko77/cursor-1c-skillsCursor rule786d agoMITA24Cursor
kotlinalkoleft/mcp-bsl-platform-contextCursor rule2158mo agoMITA961Cursor
1c-coding-standardsDesko77/cursor-1c-skillsCursor rule786d agoMITA0Cursor