{"id":17647219,"url":"https://github.com/teodev1611/batman","last_synced_at":"2025-05-07T05:47:35.453Z","repository":{"id":57644952,"uuid":"440014378","full_name":"TeoDev1611/batman","owner":"TeoDev1611","description":"A simple and super power logger","archived":false,"fork":false,"pushed_at":"2023-03-13T11:02:02.000Z","size":269,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T06:51:13.481Z","etag":null,"topics":["golang","golang-library","golang-package","log","logger","logging","logging-library"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TeoDev1611.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":"2021-12-20T01:56:43.000Z","updated_at":"2022-10-18T01:03:47.000Z","dependencies_parsed_at":"2024-06-20T04:18:16.067Z","dependency_job_id":"cda626ef-a58b-480a-b1c1-563abf3dcccd","html_url":"https://github.com/TeoDev1611/batman","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeoDev1611%2Fbatman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeoDev1611%2Fbatman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeoDev1611%2Fbatman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeoDev1611%2Fbatman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeoDev1611","download_url":"https://codeload.github.com/TeoDev1611/batman/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823685,"owners_count":21809707,"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":["golang","golang-library","golang-package","log","logger","logging","logging-library"],"created_at":"2024-10-23T11:11:31.731Z","updated_at":"2025-05-07T05:47:35.427Z","avatar_url":"https://github.com/TeoDev1611.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003cimg width=\"200\" src=\"./docs/batman.png\"\u003e\n  \u003c/p\u003e\n  \u003ch1\u003eThe most powerfull and faster logger for golang powered by DC\u003c/h1\u003e\n  \u003chr\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/teodev1611/batman?style=flat-square\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/teodev1611/batman?style=social\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/teodev1611/batman/main?filename=go.mod\"\u003e\n\u003c/div\u003e\n\n# :thinking: What is this?\n\nWell this is a simple logger created with some tools and colors :sunglasses:\n\n## :eyes: How see this in action ?\n\n- Terminal color action\n\n![Terminal Usage](./docs/terminal_image.png)\n\n- Log file generator\n\n![Log File generator](./docs/log_image.png)\n\n# :keyboard: How install this ?\n\n```\ngo get -u github.com/TeoDev1611/batman/log\n```\n\n# :ok_hand: Examples\n\n```go\npackage main\n\nimport (\n\t\"github.com/TeoDev1611/batman/log\" // Import the log library\n)\n\nfunc main() {\n\tlog.Config.AppName = \"YourAppName\" // Add the app name for the folder to create the logs\n\tlog.Config.FileToLog = \"filetolog.log\" // Add the name for the file to write the logs ( JSON FORMAT )\n\terr := log.Init() // Init the app\n\tif err != nil {\n\t\tpanic(err)          // Check the errors\n\t}\n\tlog.Info(\"an example info\") // Make a info level logger\n\tlog.Warning(\"an example warning\") // Make a warning logger\n\tlog.Error(\"an example error\") // Make a error logger\n\tlog.Fatal(\"an example fatal\") // Make a fatal\n\tprint(\"this will be not printed\") // WHY THIS NOT PRINT ( Make a os exit status 2 for the fatal)\n  // DISABLE ?? Check the customization opts\n}\n```\n\n- Customization examples\n\n```go\npackage main\n\nimport (\n\t\"github.com/TeoDev1611/batman/log\" // Import the log library\n)\n\nfunc init(){\n  log.LogOpts.Error = \"CUSTOM_KEY_ERROR\" // Custom the key for the log file in the error level DEFAULT: ERROR\n  log.LogOpts.Info = \"CUSTOM_KEY_INFO\" // Custom the key for the log file in the info level DEFAULT: INFO\n  log.LogOpts.Warning = \"CUSTOM_KEY_WARN\" // Custom the key for the log file in the warn level DEFAULT: WARN\n  log.LogOpts.Fatal = \"CUSTOM_KEY_FATAL\" // Custom the key for the log file in the fatal level DEFAULT: FATAL\n\n  log.LogOpts.ErrorExit = true // Exit the program with 2 code in the error logs DEFAULT: false\n  log.LogOpts.FatalExit = true // Exit the program with 2 code in the fatal logs DEFAULT: true\n}\n```\n\n# :books: Steps to contribute\n\n1. Make a Fork to this repository\n2. Make a branch with the feature to add\n3. Use the conventional commits guide [more information here](https://www.conventionalcommits.org/en/v1.0.0/)\n4. Make a pull request with a explanation what you changes or features\n5. Review your pull request :shipit:\n6. Merge the pull request or request changes\n7. Done! :smiley:\n\n# :mega: Credits\n\nSpecial thanks to [Ashley Willis](https://twitter.com/ashleymcnamara) were i stracted the gopher batman image [here](https://twitter.com/ashleymcnamara/status/879796984491540480/photo/2)\n\n---\n\nMade with :heart: in Ecuador\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodev1611%2Fbatman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteodev1611%2Fbatman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodev1611%2Fbatman/lists"}