All Projects → innopals → Sls Logrus Hook

innopals / Sls Logrus Hook

Licence: mit
Logrus hook for aliyun sls

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Sls Logrus Hook

Electron Log
Just a simple logging module for your Electron application
Stars: ✭ 765 (+3226.09%)
Mutual labels:  logging
Snoopy
Snoopy is a small library that logs all program executions on your Linux/BSD system (a.k.a. Snoopy Logger).
Stars: ✭ 835 (+3530.43%)
Mutual labels:  logging
Jslogger
Integrate JavaScript Logging with ASP.NET Core Logging APIs
Stars: ✭ 19 (-17.39%)
Mutual labels:  logging
Scala Logging
Convenient and performant logging library for Scala wrapping SLF4J.
Stars: ✭ 804 (+3395.65%)
Mutual labels:  logging
Jmcs
Java framework to homogenize your GUI across all the 3 main desktop OS, and further integrates your app to them.
Stars: ✭ 5 (-78.26%)
Mutual labels:  logging
Werelogs
A logging library providing efficient raw logging in the form of JSON data.
Stars: ✭ 16 (-30.43%)
Mutual labels:  logging
Splat
Makes things cross-platform
Stars: ✭ 753 (+3173.91%)
Mutual labels:  logging
Lumberjack
Web based log viewer for Erlang and Elixir applications
Stars: ✭ 22 (-4.35%)
Mutual labels:  logging
Funcraft
(have) Fun with Serverless(API Gateway & Function Compute)
Stars: ✭ 833 (+3521.74%)
Mutual labels:  aliyun
Lambdalogs
A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups.
Stars: ✭ 18 (-21.74%)
Mutual labels:  logging
Logging Helpers
Basic template helpers for printing messages out to the console. Useful for debugging context in templates. Should work with any template engine.
Stars: ✭ 5 (-78.26%)
Mutual labels:  logging
Prometheusalert
Prometheus Alert是开源的运维告警中心消息转发系统,支持主流的监控系统Prometheus,Zabbix,日志系统Graylog和数据可视化系统Grafana发出的预警消息,支持钉钉,微信,华为云短信,腾讯云短信,腾讯云电话,阿里云短信,阿里云电话等
Stars: ✭ 822 (+3473.91%)
Mutual labels:  aliyun
Simplog
A simple logger. No dependencies, no special features, just logging.
Stars: ✭ 17 (-26.09%)
Mutual labels:  logging
Opscloud
运维管理平台(阿里云),自动同步阿里云配置信息,堡垒机(容器),批量运维,Kubernetes,Zabbix管理等功能
Stars: ✭ 788 (+3326.09%)
Mutual labels:  aliyun
Sysmontools
Utilities for Sysmon
Stars: ✭ 903 (+3826.09%)
Mutual labels:  logging
Aliyungo
Go SDK for Aliyun (Alibaba Cloud) - Golang API for ECS, OSS, DNS, SLB, RDS, RAM, MNS, STS, SLS, MQ, Push, OpenSearch, DM, Container Service etc.
Stars: ✭ 756 (+3186.96%)
Mutual labels:  aliyun
Viztracer
VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.
Stars: ✭ 874 (+3700%)
Mutual labels:  logging
Thoth
An Error Logger for Go
Stars: ✭ 22 (-4.35%)
Mutual labels:  logging
Mex Vocabulary
MEX Vocabulary: a lightweight machine learning interchange format
Stars: ✭ 19 (-17.39%)
Mutual labels:  logging
Term
Unix terminal drain and formatter for slog-rs
Stars: ✭ 17 (-26.09%)
Mutual labels:  logging

Logrus Hook for Aliyun SLS

Build Status

Simple yet powerful logrus hook for aliyun simple logging service.

Features

  • Batch sending logs asynchronously
  • Dump huge logs (exceeds sls service limit) to stdout
  • Fallback dumping logs to stdout when sls api not available

Getting Start

Simply add a hook to global logrus instance or any logrus instance.

slsLogrusHook, err := hook.NewSlsLogrusHook("<project>.<region>.log.aliyuncs.com", "access_key", "access_secret", "logstore", "topic")
logrus.AddHook(slsLogrusHook)

Ensure logs are flushed to sls before program exits

slsLogrusHook.Flush(5 * time.Second)

Performance Tuning

Disable processing logs for default output.

logrus.SetFormatter(&hook.NoopFormatter{})
logrus.SetOutput(ioutil.Discard)

Disable locks.

logrus.StandardLogger().SetNoLock()

Setting send interval if necessary.

slsLogrusHook.SetSendInterval(100 * time.Millisecond) // defaults to 300 * time.Millisecond

Contributing

This project welcomes contributions from the community. Contributions are accepted using GitHub pull requests. If you're not familiar with making GitHub pull requests, please refer to the GitHub documentation "Creating a pull request".

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].