{
  "id": "fn-core-slog",
  "dataComponent": "core",
  "heading": {
    "title": "slog",
    "badges": ["Core", "Print"]
  },
  "synopsis": "Prints a value with a 'LOG:' prefix, then returns the value unchanged. If given an InkIterator or InkTransform, prints each item asynchronously as it is produced.",
  "codeBlocks": [
    "############################################\n# Example usage:\n############################################\n\n# Provide any single argument to slog.\nslog(123)          # prints 'LOG: 123', returns 123\n\nmyStr = \"Hello\"\nslog(myStr)        # prints 'LOG: Hello', returns 'Hello'\n\n# Non-blocking streaming output:\niter = ink(0, 5)\nslog(iter)\n# => prints 'LOG: 0', 'LOG: 1', ... as each item arrives\n\n# No partial usage is supported. If called with no\n# or multiple arguments, an error is raised.\n"
  ],
  "notes": [
    "Like `sput`, requires exactly one argument of any Value type.",
    "Prepends 'LOG: ' to the printed output, then returns the argument unchanged.",
    "If the value is an InkIterator or InkTransform, slog prints each yielded item as it is produced (using the poller system), and returns immediately.",
    "For ordinary values, slog prints synchronously and returns.",
    "Useful for verbose logging, leaving behind 'LOG:' markers in your console output."
  ]
}
