Skip to content

Replace logging with a C log sink API #2843

Closed

Description

@benvanik

iree/base/logging.h should be rebased onto a C API as was done with status in #265. Ideally we'd allow for scoped sinks such that contexts could have unique sinks that allowed hosting applications to filter logs, but to start a simple API that properly handled statuses would be fine.

Activity

  1. added
    enhancement ➕
    runtime
    on Aug 11, 2020
  2. added this to the milestone on Aug 11, 2020
  3. self-assigned this
    on Aug 11, 2020
  4. modified the milestones: , on Sep 12, 2020
  5. benvanik commented on Nov 16, 2020

    @benvanik
    CollaboratorAuthor

    Definitely going to be part of it: https://stackoverflow.com/a/12305221

    Idea is to have nested logging scopes - such as per instance, per context, and per invocation, per-compilation artifact, etc - that can be used for autocollapsing behavior. Normal debug group stuff. Only here we'd also allow a few optional flags for things like spinners, success/failure/etc states (to use as static icons), etc.

    No more wondering if the compiler is still going, or the model is running, and when we have a lot more inputs for LTO-style linking and a lot more models (multiple running, etc) it'd useful to monitor them.

  6. added
    ew 🤮
    runtime/api
    on Nov 22, 2020
  7. modified the milestones: , on Nov 22, 2020
  8. self-assigned this
    on Apr 16, 2021
  9. 1 remaining item

  10. benvanik commented on Oct 16, 2021

    @benvanik
    CollaboratorAuthor

    https://github.com/esneider/debug/blob/master/debug.h <- highly interesting; like fmt but in C using _Generic - would let us do things like LOG_MUMBLE("hello", world, ": ", 5);

  11. added a commit that references this issue on Jun 23, 2022
    4146f36
  12. benvanik commented on Jun 23, 2022

    @benvanik
    CollaboratorAuthor

    Probably not going to build anything new here after it's deleted in #9605. As a library we try not to have any log spew, tests can use gtest logging, and the tools are almost all LLVM-based and use the logging functionality already available in that world.

    It's still be nice to have something for interactive tools to use (cool progress spinners and colors), but that's a very different type of problem than generalized low-level library logging sinks.

  13. added 2 commits that reference this issue on Jun 23, 2022
    360b917
    3aa3e5d
  14. added a commit that references this issue on Jun 24, 2022
    91c75fb
  15. moved this to Done in IREEon Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement ➕ew 🤮runtimeruntime/api

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions