Git Product home page Git Product logo

vagrant-logs's Introduction

VagrantLogs

Build Status

This is subject to additions and changes.

Objective

  1. Print several log information ...
  2. ...and / or upload them to a Gist.

Installation

Install the plugin:

$ vagrant plugin install vagrant-logs

Do not use this command in a directory with a Vagrantfile which requires the plugin. Vagrant does always include the Vagrantfile, and therefore will fail before installation because of the missing plugin. Just cd somewhere else and retry the command, maybe from your homedir?

Usage

This plugin does not have any parameters - its sole use case is to output various debugging info. Sources of the debug data is specified in Vagrantfile, see example below.

Standard usage

vagrant logs outputs all log info in the terminal.

Gist upload

Upload to Gist can be activated by setting environment variable GIST_UPLOAD, e.g.:

GIST_UPLOAD=true vagrant logs

GITHUB_TOKEN must also be set as an environment variable.

Vagrantfile

In your Vagrantfile:

Vagrant.require_plugin 'vagrant-logs'

Vagrant.configure("2") do |config|
  # list of log files
  config.vagrant_logs.log_files = ['/var/log/*log']

  # number of lines to log
  config.vagrant_logs.lines = 5

  # list of locally checked out repositories for which the current revision should be logged
  # defaults to `cookbook_path` from [bib-vagrant](https://github.com/easybiblabs/bib-vagrant)
  config.vagrant_logs.repositories_to_check = ['~/Sites/easybib/cookbooks', '~/projects/ies/vagrant-logs']

  # list of locally available clients to check for their versions
  config.vagrant_logs.clients_to_check = ['vagrant', 'VBoxManage']
end

Developing and Testing

Make sure you are using a Bundler version which is compatible with Vagrant which comes from GitHub like defined here:

group :development do
  gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
end

Bundler version 1.10.6 works fine and can be installed like this:

gem install bundler -v '~> 1.10.6'

Then, when you want to test Bib Vagrant use:

bundle _1.10.6_ exec vagrant

Happy developing and testing.

Contributing

See Contributing

vagrant-logs's People

Contributors

seppsepp avatar

Stargazers

Matt Harris avatar Stephan Linz avatar Tom Hensel avatar Till! avatar

Watchers

Darshan Somashekar avatar James Cloos avatar Joel Gilley avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.