{"id":51197,"library":"rifflock-lfshook","title":"lfshook","description":"Package lfshook is hook for sirupsen/logrus that used for writing the logs to local files.","status":"active","version":"0.0.0-20180920164130-b9218ef580f5","language":"go","source_language":null,"source_url":"https://github.com/rifflock/lfshook","tags":["logging","logrus","file"],"install":[{"cmd":"go get github.com/rifflock/lfshook","lang":"bash","label":"Install github.com/rifflock/lfshook"}],"dependencies":[],"imports":[{"symbol":"lfshook","correct":"github.com/rifflock/lfshook"}],"quickstart":{"code":"package main\n\nimport (\n\t\"github.com/rifflock/lfshook\"\n\t\"github.com/sirupsen/logrus\"\n)\n\nfunc main() {\n\tlogrus.AddHook(lfshook.NewHook(lfshook.PathMap{\n\t\tlogrus.InfoLevel:  \"/var/log/info.log\",\n\t\tlogrus.ErrorLevel: \"/var/log/error.log\",\n\t}))\n\tlogrus.Info(\"this goes to info.log\")\n}","lang":"go","description":"Add a hook to logrus that writes log entries to separate files per level."},"warnings":[],"env_vars":null,"search_vec":"'file':16,19 'hook':5 'lfshook':1,3 'local':15 'log':13,17 'logrus':18 'packag':2 'sirupsen/logrus':7 'use':9 'write':11","created_at":"2026-06-15T06:03:52.246272+00:00","updated_at":"2026-06-15T06:03:52.246272+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/rifflock/lfshook","github":"https://github.com/rifflock/lfshook","docs":"https://pkg.go.dev/github.com/rifflock/lfshook#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["logging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}