diff options
author | Urban Müller | 2007-05-30 11:33:38 +0000 |
---|---|---|
committer | Urban Müller | 2007-05-30 11:33:38 +0000 |
commit | ffe6e66c50dd9c27088f242e7c4fe8fa55875c49 (patch) | |
tree | 2a83c15b854a27aaceddcdfb19041420b6cf9c0b /it.class | |
parent | 987b99cb033a4f7bd8586a3d802a0b6e72ffdb4e (diff) | |
download | itools-ffe6e66c50dd9c27088f242e7c4fe8fa55875c49.tar.gz itools-ffe6e66c50dd9c27088f242e7c4fe8fa55875c49.tar.bz2 itools-ffe6e66c50dd9c27088f242e7c4fe8fa55875c49.zip |
generous log permissions
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -36,11 +36,13 @@ function log($name /* ... */) { $args = func_get_args(); $line = date("Y-m-d H:i:s") . "\t" . implode("\t", array_slice($args, 1)) . "\n"; + $fn = $GLOBALS['ULTRAHOME'] . "/log/$name-" . date('Ymd'); - if ($fh = fopen($GLOBALS['ULTRAHOME'] . "/log/$name-" . date('Ymd'), "a")) + if ($fh = fopen($fn, "a")) { fputs($fh, $line); fclose($fh); + @chgrp($fn, "www"); } } |