-
Notifications
You must be signed in to change notification settings - Fork 12
/
doc.go
39 lines (32 loc) · 1.61 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2014 Space Monkey, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
Package spacelog is a collection of interface lego bricks designed to help you
build a flexible logging system.
spacelog is loosely inspired by the Python logging library.
The basic interaction is between a Logger and a Handler. A Logger is
what the programmer typically interacts with for creating log messages. A
Logger will be at a given log level, and if log messages can clear that
specific logger's log level filter, they will be passed off to the Handler.
Loggers are instantiated from GetLogger and GetLoggerNamed.
A Handler is a very generic interface for handling log events. You can provide
your own Handler for doing structured JSON output or colorized output or
countless other things.
Provided are a simple TextHandler with a variety of log event templates and
TextOutput sinks, such as io.Writer, Syslog, and so forth.
Make sure to see the source of the setup subpackage for an example of easy and
configurable logging setup at process start:
http://godoc.org/github.com/spacemonkeygo/spacelog/setup
*/
package spacelog