log-backend v0.13.0
PlaceOS Log Backend
Logging backend in common use across PlaceOS services.
A UDP stream will be opened to a log server if UDP_LOG_HOST
and UDP_LOG_PORT
are in the environment.
Log format can be configured with PLACE_LOG_FORMAT
equal to line
or json
Usage
require "placeos-log-backend"
log_backend = PlaceOS::LogBackend.log_backend
Log.setup "*", :warn, log_backend
# Use `namespaces` array to configure any namespaces you wish to have
# runtime severity switching on.
PlaceOS::LogBackend.register_severity_switch_signals(
production: App.production?,
namespaces: namespaces,
backend: log_backend,
)
Contributors
- Caspian Baska - creator and maintainer
Repository
log-backend
Owner
Statistic
- 1
- 0
- 0
- 14
- 2
- 19 days ago
- February 19, 2021
License
MIT License
Links
Synced at
Sat, 01 Feb 2025 01:21:23 GMT
Languages