{"id":21126009,"url":"https://github.com/julialogging/logging2.jl","last_synced_at":"2026-01-03T04:01:31.234Z","repository":{"id":44620894,"uuid":"283141124","full_name":"JuliaLogging/Logging2.jl","owner":"JuliaLogging","description":"A logging library to stage new ideas for stdlib Logging","archived":false,"fork":false,"pushed_at":"2022-02-04T05:17:04.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T09:06:11.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","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/JuliaLogging.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":"2020-07-28T07:53:35.000Z","updated_at":"2023-04-15T15:29:44.000Z","dependencies_parsed_at":"2022-09-01T05:01:20.465Z","dependency_job_id":null,"html_url":"https://github.com/JuliaLogging/Logging2.jl","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/JuliaLogging%2FLogging2.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaLogging%2FLogging2.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaLogging%2FLogging2.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaLogging%2FLogging2.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaLogging","download_url":"https://codeload.github.com/JuliaLogging/Logging2.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243573168,"owners_count":20312879,"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-11-20T04:38:45.172Z","updated_at":"2026-01-03T04:01:31.173Z","avatar_url":"https://github.com/JuliaLogging.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logging2\n\n[![Build Status](https://github.com/JuliaLogging/Logging2.jl/workflows/CI/badge.svg)](https://github.com/JuliaLogging/Logging2.jl/actions)\n\n**Logging2** is a library which extends the standard Julia\n[Logging library](https://docs.julialang.org/en/v1/stdlib/Logging) with\nadditional functionality. The intent of this library is to consolidate some\nof the more useful \"core\" logging functionality from the wider Julia ecosystem,\nand serve as a staging area to improve the logging standard library itself.\n\n## How-To\n\n### Redirect stdout or stderr to the logging system\n\nUse `redirect_stdout` or `redirect_stderr` to redirect all strings written to\n`stdout` or `stderr` to any `AbstractLogger` during the execution of a given\n`do` block:\n\n```julia\nlogger = current_logger() # or construct one explicitly\nredirect_stdout(logger) do\n    println(\"Hi\")\n    run(`ls`)\nend\n```\n\nNote that `stdout` and `stderr` are **global** streams, so this logging choice\nis made globally for the whole program. Therefore, you should probably only do\nthis at the top level of your application (certainly never in any library\ncode which you expect to run concurrently).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulialogging%2Flogging2.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulialogging%2Flogging2.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulialogging%2Flogging2.jl/lists"}