Versions in this module Expand all Collapse all v1 v1.0.0 Mar 31, 2020 Changes in this version + const LogLevelDebug + const LogLevelError + const LogLevelFatal + const LogLevelInfo + const LogLevelTrace + const LogLevelWarn + type Client struct + func New(conf Config) (*Client, error) + func (c *Client) Debug(line string, opt ...map[string]interface{}) error + func (c *Client) Emit(line string, opt ...map[string]interface{}) error + func (c *Client) EmitWithLevel(level, line string, opt ...map[string]interface{}) error + func (c *Client) Err(line string, opt ...map[string]interface{}) error + func (c *Client) Fatal(line string, opt ...map[string]interface{}) error + func (c *Client) Info(line string, opt ...map[string]interface{}) error + func (c *Client) RunDaemon(size int, interval time.Duration) + func (c *Client) Trace(line string, opt ...map[string]interface{}) error + func (c *Client) Warn(line string, opt ...map[string]interface{}) error + type Config struct + APIKey string + App string + CheckpointInterval time.Duration + CheckpointSize int + CustomEndpoint string + Debug bool + Env string + Hostname string + IP string + MacAddr string + MinimumLevel string + NoRetry bool + Sync bool + Tags []string + Timeout time.Duration + func (c *Config) Init() error + func (c Config) Validate() error + type Daemon struct + func NewDaemon(size int, interval time.Duration, fn func([]*logPayload) error) *Daemon + func (d *Daemon) Add(logs ...*logPayload) + func (d *Daemon) Flush() + func (d *Daemon) Run() + func (d *Daemon) Stop() + type LogData struct + App string + Env string + Level string + Message string + Meta map[string]interface{} + Time time.Time + func (d LogData) GetTime() int64