Skip to content
Back to skills

R Logging

ASecurity

R logging packages for application logging. Use for structured logging, debugging, and monitoring R applications.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 4, 2026
datapythondebugging

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill r-logging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of R Logging?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for R Logging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-r-logging/badge)](https://www.skillsdirectory.com/skills/leolin990405-r-logging)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: r-logging
description: R logging packages for application logging. Use for structured logging, debugging, and monitoring R applications.
---

# R Logging

Logging frameworks for R applications.

## Overview

| Package | Style | Features |
|---------|-------|----------|
| futile.logger | log4j-style | Hierarchical loggers, layouts |
| log4r | log4j-style | Simple, fast |
| logging | Python-style | Handlers, formatters |

## Quick Start

```r
# futile.logger
library(futile.logger)
flog.info("Application started")
flog.warn("Low memory: %d MB", memory_mb)
flog.error("Failed to connect: %s", error_msg)

# log4r
library(log4r)
logger <- logger()
info(logger, "Application started")
warn(logger, "Low memory")
error(logger, "Connection failed")

# logging
library(logging)
basicConfig()
loginfo("Application started")
logwarn("Low memory")
logerror("Connection failed")
```

## Log Levels

```r
# Standard levels (lowest to highest priority)
# TRACE < DEBUG < INFO < WARN < ERROR < FATAL

# Set threshold
flog.threshold(INFO)  # Only INFO and above
flog.threshold(DEBUG) # Include DEBUG messages
```

## Best Practices

```r
# 1. Use appropriate levels
flog.debug("Variable x = %d", x)      # Development details
flog.info("Processing file: %s", f)   # Normal operations
flog.warn("Retry attempt %d", n)      # Potential issues
flog.error("Failed: %s", msg)         # Errors
flog.fatal("Cannot continue")         # Critical failures

# 2. Include context
flog.info("[%s] User %s logged in", session_id, user)

# 3. Log to file in production
flog.appender(appender.file("app.log"))

# 4. Use structured data when possible
flog.info("Request completed", request_id = id, duration = ms)
```

## Sub-skills

- futile.logger: Full-featured log4j-style logging
- log4r: Simple and fast logging
- logging: Python-style logging

Files in this skill

  • SKILL.md1.8 KB
  • futile.logger/SKILL.md3.1 KB
  • log4r/SKILL.md3.1 KB
  • logging/SKILL.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.