尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Semantic Logger is a high-performance, asynchronous structured logging framework for Ruby and Rails.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Semantic Logger is a high-performance, asynchronous structured logging framework for Ruby and Rails.
It differs from ordinary loggers in two important ways:
require "semantic_logger"
SemanticLogger.default_level = :info
SemanticLogger.add_appender(io: $stdout, formatter: :color)
logger = SemanticLogger["MyApp"]
# A plain message, plus structured data that stays searchable
logger.info("Queried users table", duration: 54, result: :ok, table: "users")
# Log an exception with its full backtrace, plus context
logger.error("Failed to process order", exception: exception, order_id: 42)
# Measure and log how long a block takes to run
logger.measure_info("Reindexing users") { reindex_users }
When running Rails, use rails_semantic_logger instead, since it replaces the Rails default logger with Semantic Logger automatically.
Start with the Introduction, then the Programmer's Guide.
docs/.Logging to the following destinations are all supported "out-of-the-box":
sentry-raven and modern sentry-ruby gem)Semantic Logger is capable of logging thousands of lines per second without slowing down the application. Traditional logging systems make the application wait while the log information is being saved. Semantic Logger avoids this slowdown by pushing log events to an in-memory queue that is serviced by a separate thread that only handles saving log information to multiple destinations / appenders.
When running Rails, use rails_semantic_logger instead of Semantic Logger directly since it will automatically replace the Rails default logger with Semantic Logger.
Checkout the sister project Rocket Job: Ruby's missing batch system.
Fully supports Semantic Logger when running jobs in the background. Complete support for job metrics sent via Semantic Logger to your favorite dashboards.
The following gems are only required when their corresponding appenders are being used, and are therefore not automatically included by this gem:
See the Upgrading Guide for instructions on upgrading between major versions.
gem install semantic_logger
To configure a stand-alone application for Semantic Logger:
require 'semantic_logger'
# Set the global default log level
SemanticLogger.default_level = :trace
# Log to a file, and use the colorized formatter
SemanticLogger.add_appender(file_name: 'development.log', formatter: :color)
If running rails, see: Semantic Logger Rails
Contributions are welcome. See CONTRIBUTING.md for how to set up the project, run the tests, and an overview of the architecture, including a class diagram.
This project uses Semantic Versioning.