{"id":23043343,"url":"https://github.com/theodorosploumis/logging-presentation","last_synced_at":"2026-04-24T20:34:48.849Z","repository":{"id":151061865,"uuid":"172703051","full_name":"theodorosploumis/logging-presentation","owner":"theodorosploumis","description":"Introduction to server logging for web apps","archived":false,"fork":false,"pushed_at":"2019-05-15T09:39:06.000Z","size":1903,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"gh-pages","last_synced_at":"2025-06-17T20:43:59.491Z","etag":null,"topics":["apache","http-logs","logging-and-metrics","logging-server","monitoring","nginx","server-logs"],"latest_commit_sha":null,"homepage":"https://theodorosploumis.github.io/logging-presentation","language":"CSS","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/theodorosploumis.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}},"created_at":"2019-02-26T11:59:14.000Z","updated_at":"2023-07-31T12:41:04.000Z","dependencies_parsed_at":"2023-04-14T20:34:55.320Z","dependency_job_id":null,"html_url":"https://github.com/theodorosploumis/logging-presentation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theodorosploumis/logging-presentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Flogging-presentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Flogging-presentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Flogging-presentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Flogging-presentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodorosploumis","download_url":"https://codeload.github.com/theodorosploumis/logging-presentation/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Flogging-presentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32239960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["apache","http-logs","logging-and-metrics","logging-server","monitoring","nginx","server-logs"],"created_at":"2024-12-15T20:47:13.712Z","updated_at":"2026-04-24T20:34:48.835Z","avatar_url":"https://github.com/theodorosploumis.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Server logging for web apps\n\n![Area chart](https://img.icons8.com/ios/250/eeeeee/area-chart.png)\n\n\u003c!-- #### [Meetup XXX](https://www.meetup.com/XXX) --\u003e\n\u003c!-- npm install; npm start --\u003e\n\n###### [TheodorosPloumis.com](http://www.theodorosploumis.com/en) / [@theoploumis](http://twitter.com/theoploumis)\n________________________\n\n###### Get them: [online presentation](http://theodorosploumis.github.io/logging-presentation) / [source code](https://github.com/theodorosploumis/logging-presentation)\n\n###### Under [Attribution 4.0 International](http://creativecommons.org/licenses/by/4.0/) license. Icons by [icons8](https://icons8.com).\n\n---\n\n### What is this talk about\n\n- What is logging\n- How it works\n- Why we need logging\n- Common logging formats\n- Logging examples\n- Logging tools\n\n---\n\n### What is logging\n\nA server log is a log file (or several files) automatically created and maintained by a server consisting of a list of activities it performed (eg a history of page requests).\n\n[Source: wikipedia](https://en.wikipedia.org/wiki/Server_log)\n\n![Domain click](https://png.icons8.com/carbon-copy/150/eeeeee/domain.png)\n\n---\n\n### How it works\n\n![Server logging diagram](images/logging-diagram.png)\n\n---\n\n### Why we need logging\n- Protect our app\n- Know what is going on\n- Know our visitors\n- Plan our resources \u0026 needs\n- Data is Data\n\n![Protection](https://img.icons8.com/ios/150/eeeeee/hips.png)\n\n---\n\n### Log format templates\n\n```\n\u003c1.address\u003e \u003c2.user\u003e \u003c3.datetime\u003e \u003c4.request\u003e \u003c5.http-status\u003e \\\n\u003c6.request-size\u003e \u003c7.referrer\u003e \u003c8.user-agent\u003e \u003c9.request-time\u003e\n```\n\n---\n\n### Log format variables\n\n| variable | value |\n|---|---|\n| address | 62.109.16.162 |\n| user | - |\n| datetime | [26/Feb/2019:00:11:13 +0200] |\n| request | \"GET /index.php HTTP/1.1\" |\n| http-status | 200 |\n| request-size | 20702 |\n| referrer | \"/user/login\" |\n| user-agent | \"Mozilla/5.0 ... Safari/537.36\" |\n| request-time | 0.4 |\n\n![Log formats](https://img.icons8.com/ios/150/eeeeee/log.png)\n\n---\n\n### Common log formats\n```\n// Common Log Format (CLF)\n\"%h %l %u %t \\\"%r\\\" %\u003es %b\"\n\n// Common Log Format with Virtual Host\n\"%v %h %l %u %t \\\"%r\\\" %\u003es %b\"\n\n// Extended/combined log format\n\"%h %l %u %t \\\"%r\\\" %\u003es %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\"\"\n\n// Referer log format\n\"%{Referer}i -\u003e %U\"\n\n// Agent (Browser) log format\n\"%{User-agent}i\"\n```\n\nSee [apache log formats](https://httpd.apache.org/docs/2.4/mod/mod_log_config.html).\n\n---\n\n### Open source logging tools\n\n- [rsyslog](https://www.rsyslog.com)\n- [graylog](https://www.graylog.org)\n- [logwatch](https://sourceforge.net/projects/logwatch)/[ELK stack](https://www.elastic.co/elk-stack)\n- [logstash](https://github.com/elastic/logstash)\n- [fluentd](https://www.fluentd.org)\n- ... many non open-source tools\n\n![Case](https://img.icons8.com/ios/150/eeeeee/toolbox.png)\n\n---\n\n### Tips\n\n- format in JSON\n- use the common log-formats\n- if you save logs use a nosql database\n- log all application errors\n- write messages in a human-readable form\n- don't log informational data in production\n- don't log insignificant events\n- don't log anything a human can't read or react to\n\n---\n\n### Logging examples\n\n- [Real logs](examples/access.log)\n\n---\n\n### Thank you!\n\nJoin [Serres Hackathon 2019](http://hackathon.serrestech.gr) May 2019\n\n#### Questions?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorosploumis%2Flogging-presentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodorosploumis%2Flogging-presentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorosploumis%2Flogging-presentation/lists"}