Popularity
4.7
Declining
Activity
0.0
Stable
22
2
2
Programming language: Crystal
License: MIT License
Tags:
Logging And Monitoring
katip alternatives and similar shards
Based on the "Logging and monitoring" category.
Alternatively, view katip alternatives based on common mentions on social networks and blogs.
-
crystal-logreader
Reading lines in the text file which is growing and may be rotated, such as unix system log file.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of katip or a related project?
README
katip
Katip is Logger for Crystal
Installation
Add this to your application's shard.yml
:
dependencies:
katip:
github: guvencenanguvenal/katip
Usage
require "katip"
Create your logger variable and configure it.
logger = Katip::Logger.new
logger.configure do |config|
config.loglevel = Katip::LogLevel::DEBUG
config.logclassification = Katip::LogClassification::DATE_DAY
config.path = "src/katip/logfiles"
#### if you want to fill project's information
config.info.description = "This is project description."
config.info.project = "Module or project name."
config.info.version = VERSION # project version
end
And basic log it!
logger.debug("Debug mode is on!")
logger.info("Information! This is log.")
logger.warn("Warning! Please control your code.")
logger.error("Error! Please fix and re-compile it!")
logger.fatal("Fatal! OH NO!")
if you want log detail, you can use this methods.
logger.debug("Debug mode is on!", self, YourExceptionName)
logger.info("Information! This is log.", self, YourExceptionName)
logger.warn("Warning! Please control your code.", self, YourExceptionName)
logger.error("Error! Please fix and re-compile it!", self, YourExceptionName)
logger.fatal("Fatal! OH NO!", self, YourExceptionName)
JSON Output
Please do not edit manual JSON log files!
{
"katip":"0.1.0",
"info":{
"description":"",
"project":"",
"version":""},
"errors":[
{ "date":"2017-05-07 00:24:57 +0300",
"class":"Class",
"message":"Debug mode is on!",
"exception_type":"Katip::NotSetException",
"exception_message":"Not Init",
"log_level":"DEBUG"
}
]
}
View Your Logs
You can use katipviewer.html to control your logs.
Open katipviewer.html on local machine.
Choose your log json file.
Click Read JSON Log button.
Contributing
- Fork it ( https://github.com/guvencenanguvenal/katip/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- guvencenanguvenal Güven Cenan Güvenal - creator, maintainer