{"id":16091046,"url":"https://github.com/palerdot/slog","last_synced_at":"2025-07-30T09:03:05.421Z","repository":{"id":57549293,"uuid":"140093826","full_name":"palerdot/slog","owner":"palerdot","description":"Elixir module to print anything (single/multiple values) as string for debugging. Slog takes a list of values or a single value that is printed as string for debugging. Any value (string, atom, map, list, struct, keyword list ...) except functions/binaries can be printed as string with slog.","archived":false,"fork":false,"pushed_at":"2018-11-19T15:52:14.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-15T05:28:07.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/slog/","language":"Elixir","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/palerdot.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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":"2018-07-07T15:04:32.000Z","updated_at":"2022-11-01T04:32:48.000Z","dependencies_parsed_at":"2022-08-27T01:31:21.547Z","dependency_job_id":null,"html_url":"https://github.com/palerdot/slog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/palerdot/slog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palerdot%2Fslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palerdot%2Fslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palerdot%2Fslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palerdot%2Fslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palerdot","download_url":"https://codeload.github.com/palerdot/slog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palerdot%2Fslog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267842956,"owners_count":24153132,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-09T15:08:32.134Z","updated_at":"2025-07-30T09:03:05.306Z","avatar_url":"https://github.com/palerdot.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slog\n\nPrint multiple values as string (except functions and binaries) for debugging. Slog takes a list of values or a single value that is printed as string for debugging. Any value (string, atom, map, list, struct, keyword list ...) except functions can be printed as string with slog.\n\n## Usage:\n\nSlog takes a list of values or a single value that is printed as string for debugging. It takes optional keyword list as second argument\n\n```elixir\niex\u003e Slog.log [\"value is \", {:x, :x, :x}, [key: \"value\"], {:ok, \"Hello Universe!\"}]\n\"value is  {:x, :x, :x} [{:key, value}] {:ok, Hello Universe!}\"\n\n# using configuration options \niex\u003e Slog.log [\"hello\", \"universe\"], stdout: false, delimiter: \"---\"\n\"hello---universe\"\n\niex\u003e Slog.log [\"value is \", {:x, :x, :x}, [key: \"value\"], {:ok, \"Hello Universe!\"}, %User{age: 29, name: \"Arun\"}]\n\"value is  {:x, :x, :x} [{:key, value}] {:ok, Hello Universe!} %User{age: 29, name: Arun}\"\n\n# can take an optional delimiter to be printed in between values\niex\u003e Slog.log [\"value is \", {:x, :x, :x}, [key: \"value\"], {:ok, \"Hello Universe!\"}], delimiter: \" --\u003e \"\n\"value is  --\u003e {:x, :x, :x} --\u003e [{:key, value}] --\u003e {:ok, Hello Universe!}\"\n\niex\u003e Slog.log {:hello, \"Universe!\"}\n\"{:hello, Universe!}\"\n\niex\u003e Slog.log %{name: \"Arun\", age: 29}\n\"%{age: 29, name: Arun}\"\n\niex\u003e Slog.log %{manager: %User{name: \"Leonardo\", age: 69}}\n\"%{manager: %User{age: 69, name: Leonardo}}\"\n```\n\nTakes a keyword list as second parameter for options. Right now, only configurable option is `:delimiter` which takes a string and prints it between each value of the list. Usage is `Slog.log [{:hello}, {:universe}], delimiter: \" --\u003e \"`\n\n\n## Configuration Options:\n\n| option          | type           | default  | comments |\n| ----------------|:--------------:| --------:| ---------|\n| delimiter       | string         | \" \" (single space)        |   Default delimiter is single space       |\n| stdout          | boolean        | true     |   By default `Slog.log` prints to stdout using IO.puts. Try ```Slog.log [\"your_log_value\"] stdout: false``` to turn off default logging to stdout       |\n\n## Installation\n\n[Slog](https://hexdocs.pm/slog/) can be installed\nby adding `slog` to your list of dependencies in `mix.exs`:\n\n\n```elixir\ndef deps do\n  [\n    {:slog, \"~\u003e 0.1.0\", only: [:dev, :test]}\n  ]\nend\n```\n\n## About\n`Slog` is an experimental module that helps printing multiple values together instead of using something like IO.inspect multiple times. For now it is recommended to use only in `:dev, :test` environments. Feedbacks and contributions appreciated.\n\n## CHANGELOG\n\n[View Changelog](Changelog.md)\n\n## LICENSE\n\nMIT\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/slog](https://hexdocs.pm/slog).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalerdot%2Fslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalerdot%2Fslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalerdot%2Fslog/lists"}