Re: Issue with Log and newline characters in the message
| From: | Joe Stump | Date: | Thu, 14 Jul 2005 16:53:16 +0000 |
| Subject: | Re: Issue with Log and newline characters in the message | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20009@lists.php.net to get a copy of this message | ||
IIRC, there is a string format variable in Log so you can change what the output looks like. Also, Log *might* be nuking log messages with new lines (so each message shows up on a single line).
HTH
--Joe
On Jul 14, 2005, at 9:46 AM, Dan Rossi wrote:
On 15/07/2005, at 2:36 AM, Justin Patrin wrote:On 7/14/05, Dan Rossi <pear@electroteque.org> wrote:Sorry I just knew you were going to say that . $message = "An attempt to access the Feeds Key Service was unsuccessfull\n".Hi there I am attempting to add a message to a log which has new lines \n as in a block message to be added to the logs with detailed info. It doesnt seem to be working for some reason, any ideas ?I don't understand your question. Could you please explain further with package names / examples / code? --"Referring Domain: ".$data['client_host'] . "\n". "Remote Address: ".getenv("HTTP_X_FORWARDED_FOR") ? getenv("HTTP_X_FORWARDED_FOR") : getenv("REMOTE_ADDR")."\n". "Time Accessed: ".date("l dS of F Y h:i:s A")."\n". "Publishing Point: ".$data['username']."\n". "Access Code: ".$data['password'];$conf = array('mode' => 0600, 'timeFormat' => '%X %x','eol'=>'\n'); $file_logger = &Log::singleton('file', 'logs/access_errors.log', 'ident', $conf); $file_logger->log($message);outputs 00:07:16 07/15/05 ident [info] --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php