Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fdd8a1983a



Gosteno is a golang implementation of the steno log tool. The Go version of steno has a very similar feature set with orignal version.

Getting started

import (
  steno "gosteno"


func main() { c := &steno.Config{ Sinks: []steno.Sink{ steno.NewFileSink("./a.log"), steno.NewIOSink(os.Stdout), steno.NewSyslogSink(), }, Level: steno.LOG_INFO, Codec: steno.JSON_CODEC, Port: 8080, EnableLOC: true, }

  logger := steno.NewLogger("test")
  t := steno.NewTaggedLogger(logger, map[string]string{"foo": "bar", "hello": "world"})


Using gerrit

$ export GOPATH=~/gocode
$ mkdir -p $GOPATH/src/
$ cd $GOPATH/src/
$ gerrit clone ssh://[<your username>@]
$ cd gosteno
$ go test

Change log configuration on the fly

Changing log configuration such as log level without restarting application is allowed in gosteno. It is achieved through a http interface using some web api.Currently 5 apis are implemented and all data is exchanged as json:

  1. GET /regexp : get something like {"RexExp": "test$", "Level": "fatal"}
    1. PUT /regexp : put with data like {"RegExp": "test$", "Level":"fatal"}
    2. GET /loggers/{name} : get information about the logger by name
    3. PUT /loggers/{name} : put with data like {"Level" : "fatal" }
    4. GET /loggers : get information about all loggers

Supported platforms

Currently targeting modern flavors of darwin and linux.


Apache 2.0

File a Bug

To file a bug against Cloud Foundry Open Source and its components, sign up and use our bug tracking system:

Something went wrong with that request. Please try again.