Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

custom_log_space

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom_log_space

  • 0.1.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

CustomLogSpace

The CustomLogSpace gem organizes Rails logs by controller and action. With it, developers no longer need to start the rails server repeatedly just to check logs.

Installation

To begin, add the gem to your application's Gemfile:

group :development do
  gem 'custom_log_space'
end

Next, run:

$ bundle install

Alternatively, you can install it directly using:

$ gem install custom_log_space

Usage

Logs are saved in the log/custom_log_space/#{controller_name}/#{action_name}/#{date}/#{time}.log.

user log % tree
.
├── custom_log_space
│   └── articles_controller
│       ├── index
│       │   ├── 2023-09-19
│       │   │   ├── 09:13.log
│       │   │   └── 20:00.log
│       │   └── saved
│       └── show
│           ├── 2023-09-18
│           │   ├── 21:29.log
│           │   └── 22:02.log
│           ├── 2023-09-19
│           │   └── 20:00.log
│           └── saved
└── development.log

Log Retention Policy

To maintain system performance and manage disk space:

  • Date Directory: Max of 2 date-folders, excluding 'saved'. A third will remove the oldest.
  • File Limit: Up to 10 log files per date folder. Monitor your logs to stay within this.
  • Extended Retention: Need logs longer? Archive or back up them. Accidental losses are avoided this way. Remember: Files in the 'saved' directory won't be deleted. To keep a log, move it there: log/custom_log_space/#{controller_name}/#{action_name}/saved/

Ignoring Logs in Git

If needed, add /log/custom_log_space/* to your .gitignore to ensure the logs aren't committed to your repository.

/log/custom_log_space/*

Supported environments

  • Rails 7
  • Ruby 3

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/custom_log_space. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

This gem is open-sourced under the MIT License terms.

Code of Conduct

All participants in the CustomLogSpace project, whether they're interacting with codebases, issue trackers, chat rooms, or mailing lists, are expected to follow the code of conduct.

FAQs

Package last updated on 19 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc