logviewr Build Status

The logviewr package is an easy way to view and filter log4r objects using the new functionality of RStudio Add-ins (available in v0.99.878 or later).


Install the package from this github repository.


# After successful installation

After the successful installation, you'll want to restart your RStudio session and after that you will see the log viewer in the Add-ins dropdown.


Let's set up a basic logger and create a log message:


# Logger object "logger" will be created and write to 
# the file logfile.log in the current working directory
logger = create.logger()
level(logger) = "INFO"  # The log will print INFO level or more severe messages

# An example message
log4r::info(logger,"Logger has started")

Once you've done this, go to the add-in and you'll see the following screen:

Log Viewer Pane Screenshot

List of loggers

Here is the list of loggers you currently have in your Rstudio session

At least level

This will filter to show only the selected level and more severe messages. The heirarchy, from most to least severe, is: - FATAL - ERROR - WARNING - INFO - DEBUG

Search for Log Test

In addition to filtering by log level, you can type a filter string. You can also select the checkbox if you don't care about capitalization.

ayayron/logviewr documentation built on May 11, 2019, 4:12 p.m.