{"id":13437068,"url":"https://github.com/brocode/fblog","last_synced_at":"2025-10-21T04:53:05.475Z","repository":{"id":38325715,"uuid":"96447716","full_name":"brocode/fblog","owner":"brocode","description":"Small command-line JSON Log viewer","archived":false,"fork":false,"pushed_at":"2025-09-24T14:54:11.000Z","size":1340,"stargazers_count":517,"open_issues_count":2,"forks_count":32,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-24T16:40:42.414Z","etag":null,"topics":["command-line","command-line-tool","json","log","viewer"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brocode.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,"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":"2017-07-06T15:56:47.000Z","updated_at":"2025-09-24T14:54:15.000Z","dependencies_parsed_at":"2024-05-01T18:12:27.152Z","dependency_job_id":"f42892cd-55e0-4864-8bed-8e96695d99f1","html_url":"https://github.com/brocode/fblog","commit_stats":{"total_commits":340,"total_committers":12,"mean_commits":"28.333333333333332","dds":"0.12941176470588234","last_synced_commit":"d45d5f5699a88c2583dc8b4e278af0a719d307d0"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/brocode/fblog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brocode%2Ffblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brocode%2Ffblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brocode%2Ffblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brocode%2Ffblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brocode","download_url":"https://codeload.github.com/brocode/fblog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brocode%2Ffblog/sbom","scorecard":{"id":254365,"data":{"date":"2025-08-11","repo":{"name":"github.com/brocode/fblog","commit":"e4f141a2b0ce726d8a11dde2fef9c10b39003b42"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":6,"reason":"8 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":2,"reason":"Found 4/16 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/dependabot-validate.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/rust.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependabot-validate.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/dependabot-validate.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-validate.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/dependabot-validate.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/rust.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/brocode/fblog/rust.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Do What The F*ck You Want To Public License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v4.14.0 not signed: https://api.github.com/repos/brocode/fblog/releases/218843681","Warn: release artifact v4.13.1 not signed: https://api.github.com/repos/brocode/fblog/releases/180673487","Warn: release artifact v4.13.0 not signed: https://api.github.com/repos/brocode/fblog/releases/178371516","Warn: release artifact v4.12.0 not signed: https://api.github.com/repos/brocode/fblog/releases/177227308","Warn: release artifact v4.11.0 not signed: https://api.github.com/repos/brocode/fblog/releases/177213658","Warn: release artifact v4.14.0 does not have provenance: https://api.github.com/repos/brocode/fblog/releases/218843681","Warn: release artifact v4.13.1 does not have provenance: https://api.github.com/repos/brocode/fblog/releases/180673487","Warn: release artifact v4.13.0 does not have provenance: https://api.github.com/repos/brocode/fblog/releases/178371516","Warn: release artifact v4.12.0 does not have provenance: https://api.github.com/repos/brocode/fblog/releases/177227308","Warn: release artifact v4.11.0 does not have provenance: https://api.github.com/repos/brocode/fblog/releases/177213658"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T09:16:05.312Z","repository_id":38325715,"created_at":"2025-08-17T09:16:05.312Z","updated_at":"2025-08-17T09:16:05.312Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207194,"owners_count":26290616,"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-21T02:00:06.614Z","response_time":58,"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":["command-line","command-line-tool","json","log","viewer"],"created_at":"2024-07-31T03:00:54.112Z","updated_at":"2025-10-21T04:53:05.470Z","avatar_url":"https://github.com/brocode.png","language":"Rust","readme":"![](./logo/fblog_small.png)\n\n# fblog\n\n\nA small tool to view json log files.\n\n![](demo.png)\n\n## Print specific fields\n\n``` shell-script\nfblog -a message -a \"status \u003e a\" sample_nested.json.log\n```\n\n## Prefix Logs\n\nIf your query docker or kubectl for multiple pods it will prefix the log\nlines: `PODNAME | {\"message\": \"test\"}`. `fblog` can parse this and add\nit to the message. Just use `-p`.\n\n## Filter\n\nTo filter log messages it is possible to use lua. If you are unsure\nwhich variables are available you can use `--print-lua` to see the code\ngenerated by fblog.\n\n```bash\nfblog -f 'level ~= \"info\"' # will print all message where the level is not info\nfblog -f 'process == \"play\"' # will print all message where the process is play\nfblog -f 'string.find(fu, \"bow.*\") ~= nil' # will print all messages where fu starts with bow\nfblog -f 'process == \"play\"' # will print all message where the process is play\nfblog -f 'process == \"rust\" and fu == \"bower\"'\nfblog --no-implicit-filter-return-statement -f 'if 3 \u003e 2 then return true else return false end'\n\n# not valid lua identifiers like log.level gets converted to log_level.\n# Every character that is not _ or a letter will be converted to _\nfblog -d -f 'log_level == \"WARN\"' sample_elastic.log\n\n# nested fields are converted to lua records\nfblog  -d -f 'status.a == 100' sample_nested.json.log\n\n# array fields are converted to lua tables (index starts with 1)\nfblog  -d -f 'status.d[2] == \"a\"' sample_nested.json.log\n```\n\n## Customize\n\n`fblog` tries to detect the message, severity and timestamp of a log\nentry. This behavior can be customized. See `--help` for more\ninformation.\n\nYou can customize fblog messages: Format output:\n\n``` shell-script\nfblog -p --main-line-format \"{{#if short_message}}{{ red short_message }}{{/if}}\" sample.json.log\n```\n\nThe following sanitized variables are provided by fblog:\n\n-   fblog_timestamp\n-   fblog_level\n-   fblog_message\n-   fblog_prefix\n\nFor the default formatting see `--help`\n\nNested values are registered as objects. So you can use `nested.value`\nto access nested values.\n\nhandlebar helpers:\n\n-   bold\n-   yellow\n-   red\n-   blue\n-   purple\n-   cyan\n-   green\n-   color_rgb 0 0 0\n-   uppercase\n-   level_style\n-   fixed_size 10\n-   min_size 10\n\n## NO_COLOR\n\n`fblog` disables color output if the `NO_COLOR` environment variable is\npresent.\n\n[no-color](https://no-color.org/)\n\n## Message placeholder substitution\n\nPlaceholders in the message (`fblog_message`) can be substituted with\ntheir corresponding values in a context object or array. To enable\nsubstitutions, pass the `-s` flag or either set context key\n(`-c context`) or placeholder format (`-F {key}`).\n\nNote that the placeholder format should be written like\n`\u003cPREFIX\u003ekey\u003cSUFFIX\u003e`, where it would match a placeholder with the key\n`key`.\n\n### Example\n\nGiven the following log (referred to as `example.log`):\n\n``` json\n{\"message\": \"Found #{count} new items.\", \"extra_data\": {\"count\": 556}, \"level\": \"info\"}\n```\n\nRunning with the following arguments:\n\n``` bash\nfblog -c extra_data -F '#{key}' example.log\n```\n\nResult:\n\n![](./res/placeholder-example1.svg)\n\n## Installation\n\n``` bash\ncargo install fblog\n```\n\nAvailable in package managers:\n[AUR](https://aur.archlinux.org/packages/fblog/),\n[brew](https://formulae.brew.sh/formula/fblog)\n\n## Log tailing\n\n`fblog` does not support native log tailing but this is easily\nachievable.\n\n``` bash\ntail -f file | fblog\n```\n\nOr with kubernetes tooling for example\n\n``` bash\nkubectl logs -f ... | fblog\n```\n\nIn general you can pipe any endless stream to fblog.\n\n\n## shell completions\n\n```bash\nfblog --generate-completions \u003cshell\u003e\n```\n\n\n## configuration file\n\n`fblog` reads its configuration from a file called `fblog.toml`, which is located\n\nLinux: `$XDG_CONFIG_HOME` or `$HOME/.config`\n\nWindows: `{FOLDERID_RoamingAppData}`\n\nmacOS: `$HOME/Library/Application Support`\n\nIf the file does not exist or is empty [this](./default_config.toml) is the default config.\n\n\n## log levels\nThese levels are colorized by fblog:\n\n```\ntrace\ndebug\ninfo\nwarn\nerror\nfatal\n```\n\nYou can map additional level values (used for output and color):\n```toml\n[level_map]\n10 = \"trace\"\n20 = \"debug\"\n30 = \"info\"\n40 = \"warn\"\n50 = \"error\"\n60 = \"fatal\"\n# these values for example are used by https://www.npmjs.com/package/bunyan#levels\n```\n\n## k9s\n\nIn the file `~/.config/k9s/plugins.yaml` add this:\n\n```yaml\nplugins:\n  fblog-pod:\n    shortCut: Shift-L\n    confirm: false\n    description: \"fblog\"\n    scopes:\n      - pods\n    command: sh\n    background: false\n    args:\n      - -c\n      - \"kubectl logs --follow -n $NAMESPACE $NAME --context $CONTEXT | fblog\"\n  fblog-container:\n    shortCut: Shift-L\n    confirm: false\n    description: \"fblog\"\n    scopes:\n      - containers\n    command: sh\n    background: false\n    args:\n      - -c\n      - \"kubectl logs  --follow -n $NAMESPACE $POD -c $NAME --context $CONTEXT | fblog\"\n  fblog-pod-all:\n    shortCut: Shift-K\n    confirm: false\n    description: \"fblog -d\"\n    scopes:\n      - pods\n    command: sh\n    background: false\n    args:\n      - -c\n      - \"kubectl logs --follow -n $NAMESPACE $NAME --context $CONTEXT | fblog -d\"\n  fblog-container-all:\n    shortCut: Shift-K\n    confirm: false\n    description: \"fblog -d\"\n    scopes:\n      - containers\n    command: sh\n    background: false\n    args:\n      - -c\n      - \"kubectl logs  --follow -n $NAMESPACE $POD -c $NAME --context $CONTEXT | fblog -d\"\n```\n","funding_links":[],"categories":["应用","Applications","Rust","应用 Applications","应用程序 Applications"],"sub_categories":["System tools","系统工具","系统工具 System tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrocode%2Ffblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrocode%2Ffblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrocode%2Ffblog/lists"}