whatisgithub

What is logger?

hadley/logger — explained in plain English

Analysis updated 2026-07-09 · repo last pushed 2024-10-16

1RAudience · developerComplexity · 2/5StaleSetup · easy

In one sentence

A logging tool for R that helps you track what your scripts are doing by tagging messages by importance, adding timestamps, and routing them to different destinations like files or services.

Mindmap

mindmap
  root((repo))
    What it does
      Tags by importance
      Adds timestamps
      Routes to destinations
    Key features
      Custom layouts
      Color coded output
      Stacked loggers
      Namespace support
    Tech stack
      R
    Use cases
      Debugging long scripts
      Tracking data pipelines
      Package development
    Audience
      Data scientists
      R package authors
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Track each step of a data pipeline that pulls, transforms, and writes data so you can diagnose failures later.

USE CASE 2

Give users of your R package visibility into what it is doing without cluttering their screen with print statements.

USE CASE 3

Send only error-level logs to a monitoring service like DataDog while keeping verbose logs on your console.

USE CASE 4

Debug long-running scripts by filtering logs to show only warnings and errors in production.

What is it built with?

R

How does it compare?

hadley/loggerhadley/mylittleponyjohnmyleswhite/ml_for_hackers
Stars1183,739
LanguageRRR
Last pushed2024-10-162018-11-09
MaintenanceStaleDormant
Setup difficultyeasyeasymoderate
Complexity2/51/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
The explanation does not mention a license, so it is unclear what permissions apply.

So what is it?

The logger project is a tool for R users who want to add structured, readable logs to their code. Think of it as a smart diary for your scripts, instead of just using print statements, it lets you tag messages by importance (like "info," "warning," or "error"), add timestamps, color-code output, and route different kinds of messages to different destinations. It's designed to be lightweight and flexible, inspired by logging tools from other languages but built to feel natural in R. At its core, you call functions like log_info() or log_warn() with a message, and it formats and prints them automatically. You can set a threshold so only messages above a certain importance level get shown, handy for keeping things quiet in production but verbose while debugging. What makes it stand out is how customizable it is: you can change the layout, colors, and message formatting, and even stack loggers so that, say, trace-level messages go to the console while only errors get pushed to a service like DataDog or CloudWatch. It also supports namespaces, meaning different R packages loaded in the same session can each have their own logging configuration. This is useful for data scientists, analysts, and R package developers who run long or complex scripts and need to track what happened, when, and where things went wrong. For example, if you have a pipeline that pulls data from an API, transforms it, and writes it to a database, logging lets you record each step so you can diagnose failures later. It's especially valuable for package authors who want to give users visibility into what the package is doing without cluttering output. The project exists because the author found existing R logging packages either unmaintained, awkward to extend, or unidiomatic for modern R. The focus is on modularity, familiar naming conventions, and making it easy to plug in custom destinations or formats, all while keeping the default experience simple enough that you can be up and running with a couple of lines.

Copy-paste prompts

Prompt 1
Show me how to use the logger R package to log info, warning, and error messages with timestamps in a data pipeline script.
Prompt 2
How do I configure the logger package so that trace messages print to the console but only errors get sent to a log file?
Prompt 3
Help me set up the logger R package in my own package with namespaces so my package has its own logging configuration.
Prompt 4
Using the logger package, how do I change the layout and colors of log messages to match my team's preferred format?

Frequently asked questions

What is logger?

A logging tool for R that helps you track what your scripts are doing by tagging messages by importance, adding timestamps, and routing them to different destinations like files or services.

What language is logger written in?

Mainly R. The stack also includes R.

Is logger actively maintained?

Stale — no commits in 1-2 years (last push 2024-10-16).

What license does logger use?

The explanation does not mention a license, so it is unclear what permissions apply.

How hard is logger to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is logger for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.