Skip to content

Instantly share code, notes, and snippets.

@dsmrt
Last active February 8, 2019 18:57
Show Gist options
  • Save dsmrt/d03ee65699dfae595b446d20717ef99b to your computer and use it in GitHub Desktop.
Save dsmrt/d03ee65699dfae595b446d20717ef99b to your computer and use it in GitHub Desktop.
Grep large craft logs. Looking for errors.
#!/bin/bash
grep -B 3 -A 10 -n '\[error\]' storage/logs/web.log
@dsmrt
Copy link
Author

dsmrt commented Feb 8, 2019

For craft 2:
grep -B 3 -A 10 -n '\[error\]' craft/storage/runtime/logs/*.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment