Skip to content
>_ TrueFileSize.com

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

10 KB

50 lines

sample-100kb.log

100 KB

500 lines

sample-500kb.log

500 KB

2,500 lines

sample-1mb.log

1 MB

5,000 lines

sample-5mb.log

5 MB

25,000 lines

sample-10mb.log

10 MB

50,000 lines

sample-50mb.log

50 MB

250,000 lines

sample-apache-access.log

200 KB

1,000 lines

sample-nginx.log

200 KB

1,000 lines

sample-json-structured.log

300 KB

1,000 lines

sample-error.log

150 KB

500 lines

sample-syslog.log

200 KB

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" 200

Log format comparison

FormatParsingBest forIn our samples
Apache/Nginx CLFRegexWeb server access logsapache-access, nginx
JSON structuredJSON.parse()Application logs, ELKjson-structured
Error + stack traceMulti-line regexDebugging, error trackingerror
Syslog (RFC 5424)Standard parsersSystem/infrastructuresyslog
Combined (mixed)Format detection neededTesting auto-detection10MB, 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
EncodingUTF-8 (line-delimited)
Apache formatCombined Log Format (CLF)
JSON formatNDJSON (newline-delimited JSON)
Syslog standardRFC 5424
ContentRealistic IPs, timestamps, user agents, status codes

Frequently Asked Questions

Other data formats

Related reading