{"id":18773441,"url":"https://github.com/iosphere/elm-logger","last_synced_at":"2025-04-13T09:07:07.448Z","repository":{"id":62418581,"uuid":"79605034","full_name":"iosphere/elm-logger","owner":"iosphere","description":"Elm logger with support for log levels and colored console output","archived":false,"fork":false,"pushed_at":"2018-02-13T05:09:35.000Z","size":50,"stargazers_count":17,"open_issues_count":2,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T09:06:59.184Z","etag":null,"topics":["elm","tools"],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iosphere.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}},"created_at":"2017-01-20T22:11:54.000Z","updated_at":"2024-08-08T09:49:28.000Z","dependencies_parsed_at":"2022-11-01T16:32:02.729Z","dependency_job_id":null,"html_url":"https://github.com/iosphere/elm-logger","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/iosphere%2Felm-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosphere%2Felm-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosphere%2Felm-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosphere%2Felm-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iosphere","download_url":"https://codeload.github.com/iosphere/elm-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688569,"owners_count":21145766,"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":["elm","tools"],"created_at":"2024-11-07T19:34:04.037Z","updated_at":"2025-04-13T09:07:07.421Z","avatar_url":"https://github.com/iosphere.png","language":"Elm","readme":"# elm-logger\n\nThis package provides a generic logger with log levels. Logs will only be\nprinted if the log level matches or exceeds the minimum log level in the\nConfiguration.\n\nThe package's concept is that some other module in the implementation scope of\nthe app implements convenience functions wrapping a Config and Levels into\nsingle functions. See the following template for an example:\n\n    module MyUtils\n\n    import Logger\n\n    loggerConfig : Logger.Config\n    loggerConfig =\n        Logger.defaultConfig Logger.Info\n\n    log : String -\u003e a -\u003e a\n    log =\n        Logger.log loggerConfig Logger.Debug\n\n    logVerbose : String -\u003e a -\u003e a\n    logVerbose =\n        Logger.log loggerConfig Logger.Verbose\n\n\nThe value `loggerConfig` should be created using `Logger.defaultConfig` with the\nminimum log level. By changing the minimum log level in a central module you can\nsilence any logs in code that fall below that level. The above template\nimplementation allows you to replace calls to `Debug.log` with `MyUtils.log`.\n\nPlease have a look at the example app.\n\n## Advanced: color coded console logs\n\nYou can provide a custom `ExternalLoggingFunction` via `customConfig` allowing\nyou to replace the default configuration that uses `Debug.log` for printing the\nmessages.\n\n![Screenshot of a console log using elm-logger](https://github.com/iosphere/elm-logger/raw/1.0.1/console.png)\n\nThe example implementation prints nicely colored code logs to the browser's\nconsole.\n\nWhen using the native example implementation in your project, ensure to update\nthe name of the native function `_iosphere$elm_logger$Native_Logger`\nin [Logger.js](src/example/Native/Logger.js) to match the name of your\norganization and app. If you get a runtime error reading something like\n`ReferenceError: Can't find variable: _org$appname$Native_Logger`\nyou will need to update the Logger.js to reference that name.\n\nYou will also need to enable native module's for your elm project by including\nthe following value in your `elm-package.json`:\n\n```json\n    \"native-modules\": true,\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiosphere%2Felm-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiosphere%2Felm-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiosphere%2Felm-logger/lists"}