File: format_log.php

package info (click to toggle)
phabricator 0~git20160726-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 67,360 kB
  • ctags: 116,654
  • sloc: php: 489,176; sql: 14,913; ansic: 3,619; yacc: 2,484; sh: 727; lex: 488; makefile: 229; cpp: 221; python: 186; sed: 66; xml: 23
file content (10 lines) | stat: -rwxr-xr-x 222 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env php
<?php

// Simple script to format stack traces in apache logs, etc., so they are more
// readable.

$f = fopen('php://stdin', 'r');
while (($line = fgets($f)) !== false) {
  echo stripcslashes($line);
}