{"id":17802062,"url":"https://github.com/tlkamp/log-reloading","last_synced_at":"2025-09-22T04:32:35.993Z","repository":{"id":54586776,"uuid":"233344646","full_name":"tlkamp/log-reloading","owner":"tlkamp","description":"Live log reloading in Go.","archived":false,"fork":false,"pushed_at":"2021-02-09T02:51:45.000Z","size":21,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T23:41:39.711Z","etag":null,"topics":["example","go","golang","http","http-server","logging","logrus","logs","reload","reloading"],"latest_commit_sha":null,"homepage":null,"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/tlkamp.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":"2020-01-12T05:44:31.000Z","updated_at":"2023-03-17T03:48:49.000Z","dependencies_parsed_at":"2022-08-13T20:31:38.843Z","dependency_job_id":null,"html_url":"https://github.com/tlkamp/log-reloading","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/tlkamp%2Flog-reloading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlkamp%2Flog-reloading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlkamp%2Flog-reloading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlkamp%2Flog-reloading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlkamp","download_url":"https://codeload.github.com/tlkamp/log-reloading/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233824431,"owners_count":18736003,"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":["example","go","golang","http","http-server","logging","logrus","logs","reload","reloading"],"created_at":"2024-10-27T12:40:35.909Z","updated_at":"2025-09-22T04:32:30.710Z","avatar_url":"https://github.com/tlkamp.png","language":"Go","readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/tlkamp/log-reloading)](https://goreportcard.com/report/github.com/tlkamp/log-reloading)\n\n# Hot Reloading for Logs\nAn example server that can live-reload logging configuration. The server itself just logs requests and manages its own config.\n\nThe logging configuration can be updated and reloaded at will. If the `/-/reload` endpoint detects that the configuration has not changed, no action will be taken (indicated in the logs).\n\n## Demo\n![log-reload-fps](https://user-images.githubusercontent.com/18516698/72223338-41b1d880-3533-11ea-9358-97ee0597ba6d.gif)\n\n## Configuration\nThe server can be configured via flags on the command-line.\n\n\n### Server\n\n#### Available CLI Flags\n| **Flag**         | **Type**    | **Default** | **Description**                              |\n|------------------|-------------|-------------|----------------------------------------------|\n| `-bind-address`  | String      | localhost   | The address at which to listen for requests. |\n| `-config-file`     | String      | config.yaml  | The path to the config file to use.            |\n| `-port`          | Int         | 8080        | The port on which to listen for connections. |\n\n**Example**\n\n```console\n# Start the server on port 9090 using a config file called 'example.yaml'\n$ ./log-reloading -port 9090 -config-file=example.yaml\nINFO[0000] Server is starting at localhost:9090\n```\n\n### Logging\nLogging configuration is in `YAML`.\n\n```yaml\nlogging:\n  level: info  # Any of [debug, info, warn, error, fatal, panic]\n  colors: true # true or false\n  format: text # text or json\n```\n\n## Endpoints\n| **Endpoints**  | **Method** | **Description**                     |\n|----------------|------------|-------------------------------------|\n| `/-/config`     | GET        | View the current configuration.      |\n| `/-/reload`    | POST       | Reload the configuration from disk.  |\n\n## Build \u0026 Execute\n```console\n$ make run\nRemoving log-reloading\nINFO[0000] Server is starting at localhost:8080\nINFO[0008] 127.0.0.1:53863 GET /-/config\nINFO[0013] 127.0.0.1:53865 POST /-/reload\nINFO[0013] Hashes match. Skipping reload.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlkamp%2Flog-reloading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlkamp%2Flog-reloading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlkamp%2Flog-reloading/lists"}