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.
npx agentmods add rules/alkoleft/platform-context-exporter/116-java-logginggit clone --depth 1 https://github.com/alkoleft/platform-context-exporterWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.08310 |
| Opus 5 | $0.00000 | $0.04155 |
| Sonnet 5 | $0.00000 | $0.01662 |
| Haiku 4.5 | $0.00000 | $0.00831 |
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 yesterday.
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.
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:
- 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.
- 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.
- 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.
- 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. - 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).
- 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.
- 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.
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.
- yesterday First seen · 811 lines · 8,310 tokens per session scan A f0089e9f57eb
116-java-logging is a cursor rule published in the GitHub repository alkoleft/platform-context-exporter (48 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 8,310 tokens. 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.
Other cursor rules, from other repositories
1c-coding-standards
Стандарты кода BSL: именование, запросы, коллекции.
anti_patterns
Критические антипаттерны 1С: запрос в цикле, реквизиты через точку.
bsl-ssl
Переиспользование БСП, разметка правок типовых модулей, устаревшие объекты.
edt-form-xml-requirements
Требования EDT к XML-формам (Form.form): extInfo, дефолты полей.
sdd-workflow
Specification-Driven Development: 9-фазный workflow разработки.
1c-report-direct-query
Прямой запрос в отчётах 1С (СКД) без схемы компоновки.