Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Alert(t string, props ...Message) error
- func (c *Client) Critical(t string, props ...Message) error
- func (c *Client) Debug(t string, props ...Message) error
- func (c *Client) Emergency(t string, props ...Message) error
- func (c *Client) Error(t string, props ...Message) error
- func (c *Client) Flush() error
- func (c *Client) Info(t string, props ...Message) error
- func (c *Client) Notice(t string, props ...Message) error
- func (c *Client) Send(msg Message) error
- func (c *Client) SetHTTPClient(newClient *http.Client)
- func (c *Client) Tag(tags ...string)
- func (c *Client) Warn(t string, props ...Message) error
- func (c *Client) Write(b []byte) (int, error)
- type Level
- type Message
Constants ¶
View Source
const Version = "0.4.3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Optionally output logs to the given writer. Writer io.Writer // Log level defaulting to INFO. Level Level // Size of buffer before flushing [100] BufferSize int // Flush interval regardless of size [5s] FlushInterval time.Duration // Loggly end-point. Endpoint string // Token string. Token string // Default properties. Defaults Message sync.Mutex // contains filtered or unexported fields }
Loggly client.
func New ¶
New returns a new loggly client with the given `token`. Optionally pass `tags` or set them later with `.Tag()`.
func (*Client) SetHTTPClient ¶
SetHTTPClient sets the HTTP client the loggly client is going to use to connect to the loggly API.
Click to show internal directories.
Click to hide internal directories.