Sample Log File Download — Free Server Log Test Files
Download free sample server log files from 10KB to 50MB — Apache access log samples, Nginx log examples, JSON structured logs, error logs with stack traces, and syslog format. Built for DevOps engineers, SREs, and QA teams testing log parsers with ELK Stack, Splunk, Datadog, and Grafana Loki. Each test log file for parsing contains realistic timestamps, IPs, status codes, and user agents.
sample-10kb.log
50 lines
sample-100kb.log
500 lines
sample-500kb.log
2,500 lines
sample-1mb.log
5,000 lines
sample-5mb.log
25,000 lines
sample-10mb.log
50,000 lines
sample-50mb.log
250,000 lines
sample-apache-access.log
1,000 lines
sample-nginx.log
1,000 lines
sample-json-structured.log
1,000 lines
sample-error.log
500 lines
sample-syslog.log
1,500 lines
Use cases for sample log files
- Testing log parsing in ELK Stack (Elasticsearch, Logstash, Kibana)
- Verifying Grafana Loki / Promtail log ingestion
- Testing Splunk, Datadog, or New Relic log import
- Benchmarking log parsing performance (grep, awk, jq)
- Testing custom log parsers and regex patterns
- Developing and testing log monitoring dashboards
Log format examples
Apache Combined Log Format
192.168.1.42 - john [15/Jan/2024:13:55:36 +0000] "GET /api/v1/users HTTP/1.1" 200 2326 "https://example.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"JSON Structured Log (pino/winston)
{"level":"info","time":"2024-01-15T13:55:36.000Z","pid":1234,"hostname":"api-3","msg":"Request completed","req":{"method":"GET","url":"/api/v1/users"},"res":{"statusCode":200},"responseTime":42}Error Log with Stack Trace
[2024-01-15 13:55:36.123] ERROR: Connection refused to database
ConnectionRefusedError: connect ECONNREFUSED 10.0.0.5:5432
at TCPConnectWrap.afterConnect (net.js:1141:16)
at Pool.connect (pool.js:88:12)Syslog (RFC 5424)
<134>1 2024-01-15T13:55:36.000Z webserver-1 nginx 2847 - - 192.168.1.42 - - "GET /health HTTP/1.1" 200Log format comparison
| Format | Parsing | Best for | In our samples |
|---|---|---|---|
| Apache/Nginx CLF | Regex | Web server access logs | apache-access, nginx |
| JSON structured | JSON.parse() | Application logs, ELK | json-structured |
| Error + stack trace | Multi-line regex | Debugging, error tracking | error |
| Syslog (RFC 5424) | Standard parsers | System/infrastructure | syslog |
| Combined (mixed) | Format detection needed | Testing auto-detection | 10MB, 50MB |
How to parse log files
# Count requests by status code (Apache/Nginx)
awk '{print $9}' access.log | sort | uniq -c | sort -rn
# Extract all 5xx errors
grep '" 5[0-9][0-9] ' access.log
# Parse JSON structured logs with jq
cat app.log | jq -r 'select(.level == "error") | .msg'
# Count errors per hour
cat app.log | jq -r '.time[:13]' | sort | uniq -c
# Logstash grok pattern for Apache
grok { match => { "message" => "%{COMBINEDAPACHELOG}" } }
# Python log parsing
import re
pattern = r'(S+) S+ S+ [(.+?)] "(S+) (S+) S+" (d+) (d+)'
for line in open('access.log'):
match = re.match(pattern, line)
if match: print(match.groups())Technical specifications
| Extensions | .log, .txt, .out |
| Encoding | UTF-8 (line-delimited) |
| Apache format | Combined Log Format (CLF) |
| JSON format | NDJSON (newline-delimited JSON) |
| Syslog standard | RFC 5424 |
| Content | Realistic IPs, timestamps, user agents, status codes |
Frequently Asked Questions
Other data formats
Related reading
Mocking REST APIs with JSON Fixtures
Fast frontend iteration without a backend. MSW, json-server, and sample fixtures for users, products, and nested objects. Copy-paste examples.
Sample JSON Data for API Testing and Mocking
Free sample JSON files for testing REST APIs. Users, products, nested objects, GeoJSON, and API response wrappers with code examples.
Seeding Test Databases with Sample Data — SQL, JSON, CSV
How to seed development and staging databases using sample SQL dumps, JSON files, and CSV imports from TrueFileSize. Covers PostgreSQL, MySQL, SQLite, MongoDB, and Prisma.