Package 'rlog'

Title: A Simple, Opinionated Logging Utility
Description: A very lightweight package that writes out log messages in an opinionated way. Simpler and lighter than other logging packages, 'rlog' provides a compact feature set that focuses on getting the job done in a Unix-like way.
Authors: Mark Sellors [aut, cre]
Maintainer: Mark Sellors <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-16 03:33:06 UTC
Source: https://github.com/sellorm/rlog

Help Index


Log a debug message

Description

Log messages will only be emitted if the log priority matches or is higher than the priority of your message

Usage

log_debug(message)

Arguments

message

your message to log

Value

invisibly returns TRUE/FALSE

Examples

## Not run: 
log_debug("This is a debug message")
Sys.setenv("LOG_LEVEL" = "TRACE")
log_debug("This is a debug message")

## End(Not run)

Log an error message

Description

Log messages will only be emitted if the log priority matches or is higher than the priority of your message

Usage

log_error(message)

Arguments

message

your message to log

Value

invisibly returns TRUE/FALSE

Examples

## Not run: 
log_error("This is an error message")
Sys.setenv("LOG_LEVEL" = "TRACE")
log_error("This is an error message")

## End(Not run)

Log a fatal message

Description

Log messages will only be emitted if the log priority matches or is higher than the priority of your message

Usage

log_fatal(message)

Arguments

message

your message to log

Value

invisibly returns TRUE/FALSE

Examples

## Not run: 
log_fatal("This is a fatal message")
Sys.setenv("LOG_LEVEL" = "TRACE")
log_fatal("This is a fatal message")

## End(Not run)

Log an info message

Description

Log messages will only be emitted if the log priority matches or is higher than the priority of your message

Usage

log_info(message)

Arguments

message

your message to log

Value

invisibly returns TRUE/FALSE

Examples

## Not run: 
log_info("This is an info message")
Sys.setenv("LOG_LEVEL" = "TRACE")
log_info("This is an info message")

## End(Not run)

Log a trace message

Description

Log messages will only be emitted if the log priority matches or is higher than the priority of your message

Usage

log_trace(message)

Arguments

message

your message to log

Value

invisibly returns TRUE/FALSE

Examples

## Not run: 
log_trace("This is a trace message")
Sys.setenv("LOG_LEVEL" = "TRACE")
log_trace("This is a trace message")

## End(Not run)

Log a warning message

Description

Log messages will only be emitted if the log priority matches or is higher than the priority of your message

Usage

log_warn(message)

Arguments

message

your message to log

Value

invisibly returns TRUE/FALSE

Examples

## Not run: 
log_warn("This is a warning message")
Sys.setenv("LOG_LEVEL" = "TRACE")
log_warn("This is a warning message")

## End(Not run)