©
本文檔使用 php中文網手册 發布
The example illustrates reading varnish log lines from shared memory
Example #1 Read varnish shared memory log
<?php
$vl = new VarnishLog ;
while( 1 ) {
$line = $vl -> getLine ();
printf ( "%s %d %s" , VarnishLog :: getTagName ( $line [ 'tag' ], $line [ 'id' ],
$line [ 'data' ]);
}
exit( 0 );
?>