{"id":25613275,"url":"https://github.com/roq-trading/roq-logging","last_synced_at":"2025-04-13T19:06:39.030Z","repository":{"id":112577856,"uuid":"270277498","full_name":"roq-trading/roq-logging","owner":"roq-trading","description":"Logging utilities.","archived":false,"fork":false,"pushed_at":"2025-02-16T09:16:43.000Z","size":319,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T10:24:20.155Z","etag":null,"topics":["abseil-cpp","cpp23","libunwind","logging","spdlog","stacktrace"],"latest_commit_sha":null,"homepage":"https://roq-trading.com/","language":"C++","has_issues":false,"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/roq-trading.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-07T10:58:30.000Z","updated_at":"2025-02-16T09:16:47.000Z","dependencies_parsed_at":"2023-06-10T12:15:06.034Z","dependency_job_id":"2849e462-3ce3-4446-933d-32e5bcb06389","html_url":"https://github.com/roq-trading/roq-logging","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roq-trading%2Froq-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roq-trading%2Froq-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roq-trading%2Froq-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roq-trading%2Froq-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roq-trading","download_url":"https://codeload.github.com/roq-trading/roq-logging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240113626,"owners_count":19749827,"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":["abseil-cpp","cpp23","libunwind","logging","spdlog","stacktrace"],"created_at":"2025-02-22T01:29:36.131Z","updated_at":"2025-02-22T01:29:36.930Z","avatar_url":"https://github.com/roq-trading.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# roq-logging\n\nLogging utilities.\n\n\n## Operating Systems\n\n* Linux\n\n\n## Library/Package Dependencies\n\n* [Abseil](https://github.com/abseil/abseil-cpp) (Apache 2.0 License)\n* [ctre](https://github.com/hanickadot/compile-time-regular-expressions) (Apache 2.0 License)\n* [fmt](https://github.com/fmtlib/fmt) (MIT License)\n* [libunwind](https://github.com/libunwind/libunwind) (MIT License)\n* [spdlog](https://github.com/gabime/spdlog) (MIT License)\n\nOptional\n\n* [Catch2](https://github.com/catchorg/Catch2) (Boost Software License 1.0 License)\n\n\n## Prerequisites\n\nThe project is designed to be compatible with the conda package manager.\n\n```bash\nwget -N https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh\n\nbash Miniforge3-Linux-x86_64.sh -b -u -p ~/conda\n\nsource ~/conda/bin/activate\n\nconda install -y \\\n    git \\\n    cmake \\\n    gxx_linux-64 \\\n    abseil-cpp \\\n    fmt \\\n    spdlog\n\nconda install -y --channel https://roq-trading.com/conda/stable \\\n    roq-oss-ctre \\\n    roq-oss-libunwind \\\n    roq-api\n```\n\n\n## Building\n\n```bash\ngit submodule update --init --recursive\n\ncmake .\n\nmake -j4\n\nmake test\n```\n\n\n## Installing\n\nA pre-compiled binary package can be downloaded from Roq's conda package\nrepository\n\n```bash\nconda install -y --channel https://roq-trading.com/conda/stable \\\n    roq-logging\n```\n\n## Using\n\n```cpp\n#include \u003ccstdlib\u003e\n\n#include \"roq/logging.h\"\n\nvoid foo(int i) {\n  // only log when the ROQ_v environment variable has been set to 1 (or higher)\n  VLOG(1)(\"enter foo\")\n\n  // always log\n  LOG(INFO)(\"foo called with i={}\", i);\n\n  // conditional log a warning\n  LOG_IF(WARNING, i \u003e 10)(\"value exceeds threshold\");\n\n  // terminate the process with a stacktrace\n  LOG(FATAL)(\"something is wrong\");\n}\n\nint main(int argc, const char *argv[]) {\n  roq::Logger::initialize(argv[0]);\n  foo(argc);\n  roq::Logger::shutdown();\n  return EXIT_SUCCESS;\n}\n```\n\n\n## Acknowledgements\n\nThe interface is somewhat inspired by\n\n* [glog](https://github.com/google/glog) (BSD 3-Clause License)\n\n\n## License\n\nThe project is released under the terms of the MIT license.\n\n\n## Links\n\n* [Roq GmbH](https://roq-trading.com/)\n* [Documentation](https://roq-trading.com/docs/)\n* [Issues](https://github.com/roq-trading/roq-issues/issues)\n* [Contact us](mailto:info@roq-trading.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froq-trading%2Froq-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froq-trading%2Froq-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froq-trading%2Froq-logging/lists"}