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.

Generate custom LOG fileCreate up to 1GB locally in your browser

sample-10kb.log

10 KB

50 lines

Verified file details
Filename
sample-10kb.log
Exact size
10,240 bytes
Displayed size
10 KB
MIME type
application/octet-stream
Lines
50
Note
apache-access-log
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-10kb.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-100kb.log

100 KB

500 lines

Verified file details
Filename
sample-100kb.log
Exact size
102,400 bytes
Displayed size
100 KB
MIME type
application/octet-stream
Lines
500
Note
nginx-log
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-100kb.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-500kb.log

500 KB

2,500 lines

Verified file details
Filename
sample-500kb.log
Exact size
512,000 bytes
Displayed size
500 KB
MIME type
application/octet-stream
Lines
2,500
Note
application-log-json
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-500kb.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-1mb.log

1 MB

5,000 lines

Verified file details
Filename
sample-1mb.log
Exact size
1,048,576 bytes
Displayed size
1 MB
MIME type
application/octet-stream
Lines
5,000
Note
error-log
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-1mb.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-5mb.log

5 MB

25,000 lines

Verified file details
Filename
sample-5mb.log
Exact size
5,242,880 bytes
Displayed size
5 MB
MIME type
application/octet-stream
Lines
25,000
Note
syslog-format
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-5mb.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-10mb.log

10 MB

50,000 lines

Verified file details
Filename
sample-10mb.log
Exact size
10,485,760 bytes
Displayed size
10 MB
MIME type
application/octet-stream
Lines
50,000
Note
combined-log
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-10mb.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-50mb.log

50 MB

250,000 lines

Verified file details
Filename
sample-50mb.log
Exact size
52,428,800 bytes
Displayed size
50 MB
MIME type
application/octet-stream
Lines
250,000
Note
combined-log
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-50mb.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-apache-access.log

200 KB

1,000 lines

Verified file details
Filename
sample-apache-access.log
Exact size
204,800 bytes
Displayed size
200 KB
MIME type
application/octet-stream
Lines
1,000
Note
apache-combined-log-format
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-apache-access.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-nginx.log

200 KB

1,000 lines

Verified file details
Filename
sample-nginx.log
Exact size
204,800 bytes
Displayed size
200 KB
MIME type
application/octet-stream
Lines
1,000
Note
nginx-combined-format
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-nginx.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-json-structured.log

300 KB

1,000 lines

Verified file details
Filename
sample-json-structured.log
Exact size
307,200 bytes
Displayed size
300 KB
MIME type
application/octet-stream
Lines
1,000
Note
json-structured-logging
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-json-structured.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-error.log

150 KB

500 lines

Verified file details
Filename
sample-error.log
Exact size
153,600 bytes
Displayed size
150 KB
MIME type
application/octet-stream
Lines
500
Note
error-log-with-stack-traces
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-error.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-syslog.log

200 KB

1,500 lines

Verified file details
Filename
sample-syslog.log
Exact size
204,800 bytes
Displayed size
200 KB
MIME type
application/octet-stream
Lines
1,500
Note
syslog-rfc5424
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/log/sample-syslog.log

See how TrueFileSize generates and measures sample files, or review the editorial policy.

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

What is a log file?
A log file is a text file that records events, errors, and activity from software, servers, or operating systems. Each line typically contains a timestamp, severity level, source, and message. Web servers (Apache, Nginx) log every HTTP request. Applications log errors, warnings, and debug information. System logs (syslog) track OS-level events. Log files are essential for debugging, monitoring, security auditing, and performance analysis.
Apache log format explained — What is Combined Log Format?
Apache Combined Log Format (CLF) is the standard web server access log: IP - user [timestamp] "METHOD /path HTTP/1.1" status bytes "referer" "user-agent". Example: 192.168.1.42 - john [15/Jan/2024:13:55:36 +0000] "GET /api/users HTTP/1.1" 200 2326 "https://example.com/" "Mozilla/5.0...". Our sample-apache-access.log contains 1000+ realistic entries in this format for testing Logstash grok patterns and custom parsers.
How to parse log files?
CLI: grep, awk, sed for quick filtering. Structured: jq for JSON logs (cat app.log | jq '.level'). Regex: Python re module or Logstash grok patterns (%{COMBINEDAPACHELOG}). Tools: ELK Stack (Elasticsearch + Logstash + Kibana), Splunk, Datadog, Grafana Loki + Promtail. Our sample files include all major formats so you can test each parsing approach.
Structured vs unstructured logs — What is the difference?
Unstructured logs are human-readable text lines (Apache/Nginx CLF, error logs with stack traces) — parsed with regex or grok patterns. Structured logs are machine-readable JSON objects (one JSON per line, NDJSON) — parsed with JSON.parse(), used by pino, winston, bunyan. Structured logs are easier to query and index but harder to read. Our samples include both types for testing.
What log formats are included in these samples?
Five formats: (1) Apache Combined Log Format — standard web server access log. (2) Nginx logs — with upstream response timing. (3) JSON structured — NDJSON as produced by pino/winston/bunyan. (4) Error logs — with multi-line stack traces. (5) Syslog RFC 5424 — Linux system log. Plus combined files (10MB, 50MB) that interleave all five formats for testing auto-detection.
Can I use these logs with ELK Stack, Splunk, or Grafana Loki?
Yes. Apache/Nginx logs work with Logstash grok patterns (%{COMBINEDAPACHELOG}). JSON structured logs ingest directly into Elasticsearch. Syslog logs work with rsyslog/syslog-ng. For Grafana Loki, use Promtail with pipeline stages matching each format. For Splunk, use the standard source types (access_combined, syslog).

Other data formats

Related reading