{"id":18293239,"url":"https://github.com/maki-daisuke/squid-strftimer","last_synced_at":"2025-04-09T08:14:57.772Z","repository":{"id":57572365,"uuid":"207706509","full_name":"Maki-Daisuke/squid-strftimer","owner":"Maki-Daisuke","description":"Replace Sqiud-style timestamp with using strftimer format","archived":false,"fork":false,"pushed_at":"2019-10-11T21:45:06.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T00:52:10.464Z","etag":null,"topics":["log","squid"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Maki-Daisuke.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":"2019-09-11T02:35:45.000Z","updated_at":"2019-10-11T21:48:24.000Z","dependencies_parsed_at":"2022-08-24T08:40:37.598Z","dependency_job_id":null,"html_url":"https://github.com/Maki-Daisuke/squid-strftimer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maki-Daisuke%2Fsquid-strftimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maki-Daisuke%2Fsquid-strftimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maki-Daisuke%2Fsquid-strftimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maki-Daisuke%2Fsquid-strftimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maki-Daisuke","download_url":"https://codeload.github.com/Maki-Daisuke/squid-strftimer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999864,"owners_count":21031046,"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":["log","squid"],"created_at":"2024-11-05T14:23:23.225Z","updated_at":"2025-04-09T08:14:57.743Z","avatar_url":"https://github.com/Maki-Daisuke.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Squid-strftimer\n===============\n\nA TCP daemon receiving Squid logs, replacing timestamps in the logs using `strftime` format\n(cf. replacing `1568175398.603` with `2019-09-11T04:16:38.603000Z`), and then writing the result \nto a file or STDOUT\n\n\nHow to Install\n--------------\n\n```\n$ got get github.com/Maki-Daisuke/squid-strftimer\n```\n\nHow to Use\n----------\n\nStart squid-strftimer daemon:\n\n```\n$ squid-strftimer \u0026\n```\n\nAdd the following line in your `squid.conf`:\n\n```\naccess_log tcp://localhost:36059 squid\n```\n\nRestart Squid server. Then, Squid start to send access log to squid-strftimer daemon.\n\n\nUse with Docker \u0026 AWS CloudWatch Logs\n-------------------------------------\n\nYou can easily send access logs to AWS CloudWatch Logs with using Docker.\n\nFor example, you can write docker-compose.yml like this:\n\n```\n# docker-compose.yml\nversion: \"3.7\"\nservices:\n  logdaemon:\n    build:\n      image: squid-strftimer\n    logging:\n      driver: awslogs\n      options:\n        awslogs-region: ap-northeast-1\n        awslogs-group: access.log\n        awslogs-stream: mystream\n        awslogs-datetime-format: \"%Y-%m-%dT%H:%M:%S.%fZ\"\n  squid:\n    image: sameersbn/squid:3.5.27\n    volumes:\n      - type: bind\n        source: ./squid.conf\n        target: /etc/squid/squid.conf\n```\n\nAnd, add the following line in your squid.conf:\n\n```\naccess_log tcp://logdaemon:36059 squid\n```\n\nYou need to configure AWS credentials.\nSee [docker docs](https://docs.docker.com/config/containers/logging/awslogs/) for more details.\n\n\nCommand-Line Options\n--------------------\n\n```\nUsage: squid-strftimer [-h] [--format FORMAT] [--port PORT] [FILE]\n```\n\n- `FORMAT`\n  - Strftime-style format\n  - default: `\"%Y-%m-%dT%H:%M:%S.%fZ\"`\n- `PORT`\n  - TCP port to listen\n  - default: `36059`\n- `FILE`\n  - File to output logs\n  - Use STDOUT if `\"-\"` is specified\n  - default: `\"-\"`\n\n\nLicense\n-------\n\nMIT License\n\n\nAuthor\n------\n\nDaisuke (yet another) Maki\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaki-daisuke%2Fsquid-strftimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaki-daisuke%2Fsquid-strftimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaki-daisuke%2Fsquid-strftimer/lists"}