{"id":31771974,"url":"https://github.com/tstack/lnav-debug-example","last_synced_at":"2025-10-10T03:50:56.632Z","repository":{"id":315849585,"uuid":"1058208996","full_name":"tstack/lnav-debug-example","owner":"tstack","description":"Code for demonstrating log-oriented debugging","archived":false,"fork":false,"pushed_at":"2025-09-21T05:14:30.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-21T07:10:10.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-16T19:15:51.000Z","updated_at":"2025-09-21T05:14:33.000Z","dependencies_parsed_at":"2025-09-21T07:10:16.400Z","dependency_job_id":"9dcd01f6-19a3-4944-bb10-233fb934119b","html_url":"https://github.com/tstack/lnav-debug-example","commit_stats":null,"previous_names":["tstack/lnav-debug-example"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tstack/lnav-debug-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tstack%2Flnav-debug-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tstack%2Flnav-debug-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tstack%2Flnav-debug-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tstack%2Flnav-debug-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tstack","download_url":"https://codeload.github.com/tstack/lnav-debug-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tstack%2Flnav-debug-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002602,"owners_count":26083426,"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-10-10T02:00:06.843Z","response_time":62,"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":"2025-10-10T03:50:52.930Z","updated_at":"2025-10-10T03:50:56.622Z","avatar_url":"https://github.com/tstack.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# lnav-debug-example\n\nThis repository can be used to demonstrate the\n\"Log-Oriented Debugging\" features in lnav.  These\nfeatures streamline the mapping of log messages\nback to the source code that generated those\nmessages.  For example, given the message\n\"opening file: /a/b/input.json\", the\ncorresponding log statement in the source code\n(`log.info(\"opening file: %s\", path)`) can be\nfound and the values of the arguments determined\n(`path` =\u003e `/a/b/input.json`).  This mapping can\nbe shown directly in lnav by opening the message\ndetails overlay (press `p`).  Taking it even\nfurther, the lnav VS Code extension has been\nmodified to contribute a debugger mode that can\ncommunicate with an lnav instance.\n\n## Components\n\nThe \"Log-Oriented Debugging\" feature is a combination\nof the following components:\n\n* [log2src](https://github.com/ttiimm/log2src) - A\n  library that discovers log statements in source\n  code and can match them to a log message.\n* [lnav](https://lnav.org) - The Logfile Navigator,\n  a log file viewer for the terminal that handles\n  the log file processing and integrates with log2src.\n* [lnav-vscode](https://github.com/tstack/lnav-vscode/) -\n  The lnav VS Code extension that contributes a debugger\n  for the language supported by log2src.\n\n## Screenshots\n\nThe following screenshot shows an example session of\n\"Log-Oriented Debugging\":\n\n[![VS Code with lnav log debugger](docs/images/vscode-debug1.png)](docs/images/vscode-debug1.png)\n\nThe VSCode window is made up of the following:\n\n* The editor tab on the right contains an instance\n  of lnav with the log file that was generated.\n  The highlighted line (\"Finished with: ...\") is the\n  currently focused log message.\n* In the middle is the [Java code](java-logging-example/src/main/java/org/example/Main.java)\n  being debugged.  The highlighted line is the log\n  statement that generated the log messages that is\n  focused in the lnav tab.\n* The \"Variables\" panel in the top-left contains the\n  expressions and their values that were used as\n  substitutions in the log statement.\n* The \"Call Stack\" panel on the left shows the last\n  location of the known threads in the log file at\n  the focused time.  Since the focused log message\n  is in-between the lifetime of the two threads, they\n  are both shown.  Changing the focused log message\n  to one that is before or after \"Thread-1\" will\n  change this panel to only show the main thread.\n* The \"Breakpoints\" panel shows breakpoints that\n  are set on log statements in the code.\n* The top-right button bar are the debugger controls.\n  Pressing the \"Continue\" button will move the\n  focused log message to the next breakpoint for\n  the current thread.  Pressing \"Step Over\" will move\n  to the next log message in the current thread.\n  Pressing \"Step Back\" will move to the previous log\n  message in the current thread.  Movements in lnav\n  itself will also be reflected in the source code\n  editor and debug panels.\n\nThis screenshot shows lnav embedded into VS Code,\nbut you can also run lnav in a terminal and connect\nto it from VS Code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftstack%2Flnav-debug-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftstack%2Flnav-debug-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftstack%2Flnav-debug-example/lists"}