0.0
The project is in a healthy, maintained state
Official Ruby SDK for interacting with the Vigilant API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.0
~> 3.0
~> 1.0
~> 0.9

Runtime

~> 2.0
 Project Readme

Vigilant Ruby SDK

This is the Ruby SDK for Vigilant (https://vigilant.run).

Installation

bundle add vigilant-ruby

Logging Usage (Rails)

# In config/application.rb
require 'vigilant-ruby'

module YourApp
  class Application < Rails::Application
    config.logger = Vigilant::Rails::Logger.new(token: 'tk_1234567890', name: 'test-app')
    config.log_level = :debug
  end
end

Logging Usage (Standard)

require 'vigilant-ruby'

# Initialize the logger
logger = Vigilant::Logger.new(
  name: 'test-app',
  token: 'tk_1234567890',
)

# Basic logging
logger.info('User logged in')
logger.warn('Rate limit approaching')
logger.error('Database connection failed')
logger.debug('Processing request')

# Logging with attributes
logger.info('User logged in', { user_id: 123, ip_address: '192.168.1.1' })

# Shutdown the logger
logger.shutdown

Logging Usage (Autocapture)

require 'vigilant-ruby'

# Initialize the logger
logger = Vigilant::Logger.new(
  name: 'test-app',
  token: 'tk_1234567890',
)

# Enable autocapture
logger.autocapture_enable

# Log with autocapture
puts 'A print statement'

# Log without autocapture
logger.info('A regular log')

# Shutdown the logger
logger.shutdown