Shard Detail

katip v0.1.0

Katip is JSONBase Logger for Crystal
crystal json logger log-json logging

Install & Use

Add the following code to your project's shard.yml under:

dependencies to use in production
- OR -
development_dependencies to use in development

  github: guvencenanguvenal/katip



Katip is Logger for Crystal


Add this to your application's shard.yml:

    github: guvencenanguvenal/katip


require "katip"

Create your logger variable and configure it.

logger =

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 = "This is project description." = "Module or project name." = VERSION 	# project version

And basic log it!

logger.debug("Debug mode is on!")"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)"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!

    	   { "date":"2017-05-07 00:24:57 +0300", 
            "message":"Debug mode is on!", 
            "exception_message":"Not Init", 

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.


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request