Code Monkey home page Code Monkey logo

logpipe's Introduction

LogPipe

Simple service that will let you pipe logs directly to Stackdriver Logging.

Background

Google App Engine and Container Engine automatically stream logs to Stackdriver Logging. Docker also supports streaming logs to Stackdriver.

However, raw Compute Engine does not. Other cloud VMs also do not. You can install the logging agent on Compute Engine, but that requires you to log to a common log file, custom log file, or syslog.

If you want a simple way to stream logs from the Stdout of any program to Stackdriver Logging, this is for you!

Install

You can download a pre-compiled binary for your system here.

Otherwise:

go get -u github.com/thesandlord/logpipe

Setup

Note: If you are running on Google Compute Engine, there is no need for any setup.

If you want to use this on your local machine, install the Google Cloud SDK and run:

gcloud auth application-default login

If you are running on a VM outside Google Cloud, follow the steps here to set the GOOGLE_APPLICATION_CREDENTIALS environment variable.

Usage

Usage:
  logpipe [OPTIONS]

Application Options:
  -p, --project= Google Cloud Platform Project ID
  -l, --logname= The name of the log to write to (default: default)

Help Options:
  -h, --help     Show this help message

Examples

This will log all the output from a Node.js program

node app.js | logpipe -p <YOUR_PROJECT_ID>

This will log the word "hello" 5 times to the "default" log

yes hello | head -n 5 | logpipe -p <YOUR_PROJECT_ID>

This will log the word "test" to the "tester" log

echo test | logpipe -p <YOUR_PROJECT_ID> -l tester

logpipe's People

Contributors

thesandlord avatar

Stargazers

KAYUII avatar William Allen avatar sakamossan avatar Jakub Janarek avatar Kirill Groshkov avatar Akimasa avatar Marco Casula avatar Jack Wilsdon avatar gaura avatar tz ✨ avatar Carl Osipov avatar Jan Weitz avatar Alexandru Keszeg avatar rusty kay avatar Fabrizio Ferrai avatar Rimantas (Rimas) Mocevicius avatar  avatar Connor avatar Michael Wagner avatar Daniel Romero avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

logpipe's Issues

Release

Dude, first of all, awesome.

How about uploading a binary release so I don't need to install Go on my machine to get this?

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.