{"id":16728291,"url":"https://github.com/tmc/log","last_synced_at":"2025-06-25T13:03:56.197Z","repository":{"id":66500245,"uuid":"67313961","full_name":"tmc/log","owner":"tmc","description":"Package log wraps logrus to include source line/function information","archived":false,"fork":false,"pushed_at":"2018-06-16T09:01:33.000Z","size":6,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T13:03:04.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-03T22:12:11.000Z","updated_at":"2024-08-13T18:17:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6019e77-9ad0-476e-a4df-2c91df3e4b26","html_url":"https://github.com/tmc/log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tmc/log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmc","download_url":"https://codeload.github.com/tmc/log/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261879271,"owners_count":23223736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:09:44.069Z","updated_at":"2025-06-25T13:03:56.172Z","avatar_url":"https://github.com/tmc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# log\n`import \"github.com/tmc/log\"`\n\n* [Overview](#pkg-overview)\n* [Index](#pkg-index)\n\n## \u003ca name=\"pkg-overview\"\u003eOverview\u003c/a\u003e\nPackage log wraps logrus to include source line/function information\n\ninspired by prometheus/common/log\n\n\n\n\n## \u003ca name=\"pkg-index\"\u003eIndex\u003c/a\u003e\n* [func Debug(args ...interface{})](#Debug)\n* [func Debugln(args ...interface{})](#Debugln)\n* [func Error(args ...interface{})](#Error)\n* [func Errorln(args ...interface{})](#Errorln)\n* [func Fatal(args ...interface{})](#Fatal)\n* [func Fatalln(args ...interface{})](#Fatalln)\n* [func Info(args ...interface{})](#Info)\n* [func Infoln(args ...interface{})](#Infoln)\n* [func SetLevel(level Level)](#SetLevel)\n* [func Warn(args ...interface{})](#Warn)\n* [func Warnln(args ...interface{})](#Warnln)\n* [type Level](#Level)\n* [type Logger](#Logger)\n  * [func Base() Logger](#Base)\n  * [func New() Logger](#New)\n  * [func With(key string, value interface{}) Logger](#With)\n  * [func WithError(err error) Logger](#WithError)\n\n\n#### \u003ca name=\"pkg-files\"\u003ePackage files\u003c/a\u003e\n[doc.go](/src/github.com/tmc/log/doc.go) [log.go](/src/github.com/tmc/log/log.go) \n\n\n\n\n\n## \u003ca name=\"Debug\"\u003efunc\u003c/a\u003e [Debug](/src/target/log.go?s=4370:4401#L164)\n``` go\nfunc Debug(args ...interface{})\n```\nDebug logs a message at level Debug on the standard logger.\n\n\n\n## \u003ca name=\"Debugln\"\u003efunc\u003c/a\u003e [Debugln](/src/target/log.go?s=4509:4542#L169)\n``` go\nfunc Debugln(args ...interface{})\n```\nDebugln logs a message at level Debug on the standard logger.\n\n\n\n## \u003ca name=\"Error\"\u003efunc\u003c/a\u003e [Error](/src/target/log.go?s=5194:5225#L194)\n``` go\nfunc Error(args ...interface{})\n```\nError logs a message at level Error on the standard logger.\n\n\n\n## \u003ca name=\"Errorln\"\u003efunc\u003c/a\u003e [Errorln](/src/target/log.go?s=5333:5366#L199)\n``` go\nfunc Errorln(args ...interface{})\n```\nErrorln logs a message at level Error on the standard logger.\n\n\n\n## \u003ca name=\"Fatal\"\u003efunc\u003c/a\u003e [Fatal](/src/target/log.go?s=5474:5505#L204)\n``` go\nfunc Fatal(args ...interface{})\n```\nFatal logs a message at level Fatal on the standard logger.\n\n\n\n## \u003ca name=\"Fatalln\"\u003efunc\u003c/a\u003e [Fatalln](/src/target/log.go?s=5613:5646#L209)\n``` go\nfunc Fatalln(args ...interface{})\n```\nFatalln logs a message at level Fatal on the standard logger.\n\n\n\n## \u003ca name=\"Info\"\u003efunc\u003c/a\u003e [Info](/src/target/log.go?s=4648:4678#L174)\n``` go\nfunc Info(args ...interface{})\n```\nInfo logs a message at level Info on the standard logger.\n\n\n\n## \u003ca name=\"Infoln\"\u003efunc\u003c/a\u003e [Infoln](/src/target/log.go?s=4783:4815#L179)\n``` go\nfunc Infoln(args ...interface{})\n```\nInfoln logs a message at level Info on the standard logger.\n\n\n\n## \u003ca name=\"SetLevel\"\u003efunc\u003c/a\u003e [SetLevel](/src/target/log.go?s=3912:3938#L149)\n``` go\nfunc SetLevel(level Level)\n```\nSetLevel sets the Level of the base logger\n\n\n\n## \u003ca name=\"Warn\"\u003efunc\u003c/a\u003e [Warn](/src/target/log.go?s=4920:4950#L184)\n``` go\nfunc Warn(args ...interface{})\n```\nWarn logs a message at level Warn on the standard logger.\n\n\n\n## \u003ca name=\"Warnln\"\u003efunc\u003c/a\u003e [Warnln](/src/target/log.go?s=5055:5087#L189)\n``` go\nfunc Warnln(args ...interface{})\n```\nWarnln logs a message at level Warn on the standard logger.\n\n\n\n\n## \u003ca name=\"Level\"\u003etype\u003c/a\u003e [Level](/src/target/log.go?s=134:150#L3)\n``` go\ntype Level uint8\n```\nLevel describes the log severity level.\n\n\n``` go\nconst (\n    // PanicLevel level, highest level of severity. Logs and then calls panic with the\n    // message passed to Debug, Info, ...\n    PanicLevel Level = iota\n    // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the\n    // logging level is set to Panic.\n    FatalLevel\n    // ErrorLevel level. Logs. Used for errors that should definitely be noted.\n    // Commonly used for hooks to send errors to an error tracking service.\n    ErrorLevel\n    // WarnLevel level. Non-critical entries that deserve eyes.\n    WarnLevel\n    // InfoLevel level. General operational entries about what's going on inside the\n    // application.\n    InfoLevel\n    // DebugLevel level. Usually only enabled when debugging. Very verbose logging.\n    DebugLevel\n)\n```\n\n\n\n\n\n\n\n\n\n## \u003ca name=\"Logger\"\u003etype\u003c/a\u003e [Logger](/src/target/log.go?s=926:1312#L25)\n``` go\ntype Logger interface {\n    SetLevel(level Level)\n    SetOut(out io.Writer)\n\n    Debug(...interface{})\n    Debugln(...interface{})\n\n    Info(...interface{})\n    Infoln(...interface{})\n\n    Warn(...interface{})\n    Warnln(...interface{})\n\n    Error(...interface{})\n    Errorln(...interface{})\n\n    Fatal(...interface{})\n    Fatalln(...interface{})\n\n    With(key string, value interface{}) Logger\n    WithError(err error) Logger\n}\n```\nLogger is an interface that describes logging.\n\n\n\n\n\n\n\n### \u003ca name=\"Base\"\u003efunc\u003c/a\u003e [Base](/src/target/log.go?s=3823:3841#L144)\n``` go\nfunc Base() Logger\n```\nBase returns the base logger.\n\n\n### \u003ca name=\"New\"\u003efunc\u003c/a\u003e [New](/src/target/log.go?s=3716:3733#L139)\n``` go\nfunc New() Logger\n```\nNew returns a new logger.\n\n\n### \u003ca name=\"With\"\u003efunc\u003c/a\u003e [With](/src/target/log.go?s=4037:4084#L154)\n``` go\nfunc With(key string, value interface{}) Logger\n```\nWith attaches a key,value pair to a logger.\n\n\n### \u003ca name=\"WithError\"\u003efunc\u003c/a\u003e [WithError](/src/target/log.go?s=4210:4242#L159)\n``` go\nfunc WithError(err error) Logger\n```\nWithError returns a Logger that will print an error along with the next message.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmc%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmc%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmc%2Flog/lists"}