From log4php-user-returnjessebrown@example.org Tue Jan 04 02:25:16 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 89836 invoked from network); 4 Jan 2011 02:25:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 02:25:16 -0000 Received: (qmail 5585 invoked by uid 500); 4 Jan 2011 02:25:15 -0000 Delivered-To: jessebrown@example.org Received: (qmail 5542 invoked by uid 500); 4 Jan 2011 02:25:15 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 5534 invoked by uid 99); 4 Jan 2011 02:25:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 02:25:15 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO sam.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 02:25:10 +0000 Received: from isper.nabble.com ([83.161.120.155]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from <jessebrown@example.org>) id 1PZwZt-00046U-Rz for jessebrown@example.org; Mon, 03 Jan 2011 18:24:49 -0800 Message-ID: <jessebrown@example.org> Date: Mon, 3 Jan 2011 18:24:49 -0800 (PST) From: tinkee <jessebrown@example.org> To: jessebrown@example.org Subject: log4php not working properly MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jessebrown@example.org hi, i'm using the log4php for my logging. specifically the LoggerAppenderDailyFile but it could not create the logfile successfully. myconfig.xml -->resides in the same level with my php file -------------------------------------------------------------------- log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" > <appender name="logged_it" class='LoggerAppenderDailyFile'> <layout class="LoggerLayoutTTCC"> </layout> </appender> <root> <level value="debug" /> <appender_ref ref="logged_it" /> </root> </log4php:configuration> the php file is this: <?php require_once ('../log4php/php/Logger.php'); Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); //for checking $temp = "hello there!"; echo $temp; $logger = Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); -->what should be specified here in getLogger? -->a random value is assigned here $logger->debug('Hello!'); ?> did i miss out on somehting? my php version is php5.1.X and im using the log4php 2.0.0-incubating. does the version has any effect? thanks a lot. -- View this message in context: http://old.nabble.com/log4php-not-working-properly-tp30583406p30583406.html Sent from the Log4php - Users mailing list jessebrown@example.org. From log4php-user-returnjessebrown@example.org Tue Jan 04 06:37:39 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 99650 invoked from network); 4 Jan 2011 06:37:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 06:37:39 -0000 Received: (qmail 70930 invoked by uid 500); 4 Jan 2011 06:37:39 -0000 Delivered-To: jessebrown@example.org Received: (qmail 70843 invoked by uid 500); 4 Jan 2011 06:37:37 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 70835 invoked by uid 99); 4 Jan 2011 06:37:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 06:37:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-iw0-f175.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 06:37:30 +0000 Received: by iwn8 with SMTP id 8so14079077iwn.34 for <jessebrown@example.org>; Mon, 03 Jan 2011 22:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=cfRxkbPvaLZsD6T2P+y2y+YNetFc+3MhK3XJgK7WzsA=; b=BAwHby8zhKatupO4+b4pojKa6MhYTI9NsSb58T7XwWVmV1l3CpzXF1mcfDCj0CPJ7M 8SZFW8lxEL3In5OkM86ash1dq7FVcVCCAfFjWvCjCJIFCKxYHdQSrMnxzS9SrrKV41GL omCyBQ9hSNhn9XGXAztLTE1VIFLrbakjJ3POk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=mZ34bKBmqiZsKyz6Kw7OUVgperFcT3SGZJeHJtOVcu8qiR3/HRNlT1ML3gEOwQLW0u 4fqb0Tnv61Atv6K2UoUgHhwiALGRDKObkawJmtACGFSuFtQOrThOmAmf8ndc5b/c+jbv D1AJOyJc2hqiRkTZkW/1T2Jpfqx1vrlKdppXg= Received: by 83.161.120.155 with SMTP id b5mr21865255icz.105.1294123028105; Mon, 03 Jan 2011 22:37:08 -0800 (PST) MIME-Version: 1.0 Received: by 83.161.120.155 with HTTP; Mon, 3 Jan 2011 22:36:46 -0800 (PST) In-Reply-To: <jessebrown@example.org> References: <jessebrown@example.org> From: Christian Grobmeier <jessebrown@example.org> Date: Tue, 4 Jan 2011 07:36:46 +0100 Message-ID: <jessebrown@example.org> Subject: Re: log4php not working properly To: Log4PHP User <jessebrown@example.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hello, http://logging.apache.org/log4php/docs/appenders.html#LoggerAppenderDailyFi= le there is some more which needs to be configured: log4php.appender.default.datePattern =3D Ymd log4php.appender.default.file =3D target/examples/daily_%s.log In your case it should look like: <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> <layout class=3D"LoggerLayoutTTCC" /> <param name=3D"datePattern" value=3D"Ymd" /> <param name=3D"file" value=3D"target/examples/daily_%s.log" /> =C2=A0</appender> Or similar However, I just reckognized that the xml documentation is far from good. Its no surprise its usage is unclear. Best regards, Christian On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> wrote: > > hi, > > i'm using the log4php for my logging. > specifically the LoggerAppenderDailyFile > but it could not create the logfile successfully. > > > myconfig.xml -->resides in the same level with my php file > -------------------------------------------------------------------- > log4php:configuration xmlns:log4php=3D"http://logging.apache.org/log4php/= " > > =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderDailyFil= e'> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> > > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> > =C2=A0 =C2=A0</appender> > =C2=A0 =C2=A0<root> > =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> > =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> > =C2=A0 =C2=A0</root> > </log4php:configuration> > > > > the php file is this: > <?php > > require_once ('../log4php/php/Logger.php'); > Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); > > //for checking > $temp =3D "hello there!"; > echo $temp; > > $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should be speci= fied here > in getLogger? > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random value > is assigned here > $logger->debug('Hello!'); > > ?> > > > did i miss out on somehting? > > my php version is php5.1.X > and im using the log4php 2.0.0-incubating. > > does the version has any effect? > > thanks a lot. > -- > View this message in context: http://old.nabble.com/log4php-not-working-p= roperly-tp30583406p30583406.html > Sent from the Log4php - Users mailing list jessebrown@example.org. > > --=20 http://www.grobmeier.de From log4php-user-returnjessebrown@example.org Tue Jan 04 07:28:40 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 17106 invoked from network); 4 Jan 2011 07:28:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 07:28:40 -0000 Received: (qmail 6889 invoked by uid 500); 4 Jan 2011 07:28:40 -0000 Delivered-To: jessebrown@example.org Received: (qmail 6697 invoked by uid 500); 4 Jan 2011 07:28:37 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 6685 invoked by uid 99); 4 Jan 2011 07:28:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:28:37 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO sam.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:28:32 +0000 Received: from isper.nabble.com ([83.161.120.155]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from <jessebrown@example.org>) id 1Pa1JT-0005Z9-R6 for jessebrown@example.org; Mon, 03 Jan 2011 23:28:11 -0800 Message-ID: <jessebrown@example.org> Date: Mon, 3 Jan 2011 23:28:11 -0800 (PST) From: tinkee <jessebrown@example.org> To: jessebrown@example.org Subject: Re: log4php not working properly In-Reply-To: <jessebrown@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: jessebrown@example.org References: <jessebrown@example.org> <jessebrown@example.org> Hi! thanks a lot for the reply! i've figured out the problem already, i think in the fopen part of Logger.php it could not create the file. Because i tried to create an empty file with the same title as the filename that i set in my xml, it successfully wrote on the logfile! i read that fopen(), would supposedly create an unexisting file if "w" is specified in the second param. i tried it and i could not get it to work.. if i dont create a file in the path i specified, it could not create the file successfully. have an idea how to do it? :( thanks a lot. =20 Christian grobmeier wrote: >=20 > Hello, >=20 > http://logging.apache.org/log4php/docs/appenders.html#LoggerAppenderDaily= File > there is some more which needs to be configured: >=20 > log4php.appender.default.datePattern =3D Ymd > log4php.appender.default.file =3D target/examples/daily_%s.log >=20 > In your case it should look like: >=20 > <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> > <layout class=3D"LoggerLayoutTTCC" /> >=20 >=20 > =C2=A0</appender> >=20 > Or similar >=20 > However, I just reckognized that the xml documentation is far from > good. Its no surprise its usage is unclear. >=20 > Best regards, > Christian >=20 >=20 > On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> wrote: >> >> hi, >> >> i'm using the log4php for my logging. >> specifically the LoggerAppenderDailyFile >> but it could not create the logfile successfully. >> >> >> myconfig.xml -->resides in the same level with my php file >> -------------------------------------------------------------------- >> log4php:configuration xmlns:log4php=3D"http://logging.apache.org/log4php= /" >> > >> =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderDailyFi= le'> >> >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> >> >> >> >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> >> =C2=A0 =C2=A0</appender> >> =C2=A0 =C2=A0<root> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> >> =C2=A0 =C2=A0</root> >> </log4php:configuration> >> >> >> >> the php file is this: >> <?php >> >> require_once ('../log4php/php/Logger.php'); >> Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); >> >> //for checking >> $temp =3D "hello there!"; >> echo $temp; >> >> $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should be spec= ified >> here >> in getLogger? >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random >> value >> is assigned here >> $logger->debug('Hello!'); >> >> ?> >> >> >> did i miss out on somehting? >> >> my php version is php5.1.X >> and im using the log4php 2.0.0-incubating. >> >> does the version has any effect? >> >> thanks a lot. >> -- >> View this message in context: >> http://old.nabble.com/log4php-not-working-properly-tp30583406p30583406.h= tml >> Sent from the Log4php - Users mailing list jessebrown@example.org. >> >> >=20 >=20 >=20 > --=20 > http://www.grobmeier.de >=20 >=20 --=20 View this message in context: http://old.nabble.com/log4php-not-working-pro= perly-tp30583406p30584450.html Sent from the Log4php - Users mailing list jessebrown@example.org. From log4php-user-returnjessebrown@example.org Tue Jan 04 07:36:01 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 18839 invoked from network); 4 Jan 2011 07:36:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 07:36:01 -0000 Received: (qmail 12796 invoked by uid 500); 4 Jan 2011 07:36:01 -0000 Delivered-To: jessebrown@example.org Received: (qmail 12702 invoked by uid 500); 4 Jan 2011 07:35:59 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 12694 invoked by uid 99); 4 Jan 2011 07:35:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:35:59 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-iy0-f175.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:35:54 +0000 Received: by iyj18 with SMTP id 18so12981017iyj.34 for <jessebrown@example.org>; Mon, 03 Jan 2011 23:35:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=g9GrxBWzrtVCWYw7v3wsO4BS/4LCnDwlLsTK8DTOYcU=; b=xfXsg+dKr6M/TzpT3D8llFKp/GAZF1cAYEPHhaw10XxQwaDU6CVei70u/xTJ7lf9Wu cQlXyFFjsLrlyt0sm7yo0QaP2ROGgbnouIRFItpmFjpy0uf/ILgFtV4fUXZxetSncXiB GJRE2Y1Z28SzRzfGPQlIfvfFhXwQtWnu5iW7Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=GtttWFBZ0hIz1fAyFpLXHcmiKDgyV+OyrBUgy1KWfpWhRY0X3vR+DIgu5SXHNUJqeh CfRq4KTOksBvKAPsr9hLXPOFjZy/QnhMiLb7Fj6fhO9uzUO1JCyxQoIj8I4iruNgaCvl tqEKxKGK8AshpNFSKvxpjUFqxRcQDl2Xqwefo= Received: by 83.161.120.155 with SMTP id it7mr21834748icb.507.1294126532349; Mon, 03 Jan 2011 23:35:32 -0800 (PST) MIME-Version: 1.0 Received: by 83.161.120.155 with HTTP; Mon, 3 Jan 2011 23:35:11 -0800 (PST) In-Reply-To: <jessebrown@example.org> References: <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> From: Christian Grobmeier <jessebrown@example.org> Date: Tue, 4 Jan 2011 08:35:11 +0100 Message-ID: <jessebrown@example.org> Subject: Re: log4php not working properly To: Log4PHP User <jessebrown@example.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, thats weird. It should do as you wrote. You could check if the file paths comes through correct. Open the FileAppender and put an echo at line 69: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appenders/L= oggerAppenderFile.php?view=3Dmarkup Check if the folder can be opened and you have access to write to it (what OS are u using?) In windows world you probably need C:\ or something before the path begins My feeling says, its something related to that - either the filename param comes to the appender or the path is not correct (because its used different from php maybe) Cheers On Tue, Jan 4, 2011 at 8:28 AM, tinkee <jessebrown@example.org> wrote: > > > > Hi! > > thanks a lot for the reply! > i've figured out the problem already, i think in the fopen part of > Logger.php > it could not create the file. > > Because i tried to create an empty file with the same title as the filena= me > that i set in my xml, > it successfully wrote on the logfile! i read that fopen(), would supposed= ly > create an unexisting file > if "w" is specified in the second param. i tried it and i could not get i= t > to work.. if i dont create a file > in the path i specified, it could not create the file successfully. > > have an idea how to do it? :( > > thanks a lot. > > > > > > Christian grobmeier wrote: >> >> Hello, >> >> http://logging.apache.org/log4php/docs/appenders.html#LoggerAppenderDail= yFile >> there is some more which needs to be configured: >> >> log4php.appender.default.datePattern =3D Ymd >> log4php.appender.default.file =3D target/examples/daily_%s.log >> >> In your case it should look like: >> >> <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> >> <layout class=3D"LoggerLayoutTTCC" /> >> >> >> =C2=A0</appender> >> >> Or similar >> >> However, I just reckognized that the xml documentation is far from >> good. Its no surprise its usage is unclear. >> >> Best regards, >> Christian >> >> >> On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> wrote= : >>> >>> hi, >>> >>> i'm using the log4php for my logging. >>> specifically the LoggerAppenderDailyFile >>> but it could not create the logfile successfully. >>> >>> >>> myconfig.xml -->resides in the same level with my php file >>> -------------------------------------------------------------------- >>> log4php:configuration xmlns:log4php=3D"http://logging.apache.org/log4ph= p/" >>> > >>> =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderDailyF= ile'> >>> >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> >>> >>> >>> >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> >>> =C2=A0 =C2=A0</appender> >>> =C2=A0 =C2=A0<root> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> >>> =C2=A0 =C2=A0</root> >>> </log4php:configuration> >>> >>> >>> >>> the php file is this: >>> <?php >>> >>> require_once ('../log4php/php/Logger.php'); >>> Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); >>> >>> //for checking >>> $temp =3D "hello there!"; >>> echo $temp; >>> >>> $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should be spe= cified >>> here >>> in getLogger? >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random >>> value >>> is assigned here >>> $logger->debug('Hello!'); >>> >>> ?> >>> >>> >>> did i miss out on somehting? >>> >>> my php version is php5.1.X >>> and im using the log4php 2.0.0-incubating. >>> >>> does the version has any effect? >>> >>> thanks a lot. >>> -- >>> View this message in context: >>> http://old.nabble.com/log4php-not-working-properly-tp30583406p30583406.= html >>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>> >>> >> >> >> >> -- >> http://www.grobmeier.de >> >> > > -- > View this message in context: http://old.nabble.com/log4php-not-working-p= roperly-tp30583406p30584450.html > Sent from the Log4php - Users mailing list jessebrown@example.org. > > --=20 http://www.grobmeier.de From log4php-user-returnjessebrown@example.org Tue Jan 04 07:51:56 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 22240 invoked from network); 4 Jan 2011 07:51:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 07:51:56 -0000 Received: (qmail 25724 invoked by uid 500); 4 Jan 2011 07:51:56 -0000 Delivered-To: jessebrown@example.org Received: (qmail 25631 invoked by uid 500); 4 Jan 2011 07:51:55 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 25623 invoked by uid 99); 4 Jan 2011 07:51:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:51:54 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO sam.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:51:49 +0000 Received: from isper.nabble.com ([83.161.120.155]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from <jessebrown@example.org>) id 1Pa1g1-0006yq-FK for jessebrown@example.org; Mon, 03 Jan 2011 23:51:29 -0800 Message-ID: <jessebrown@example.org> Date: Mon, 3 Jan 2011 23:51:29 -0800 (PST) From: tinkee <jessebrown@example.org> To: jessebrown@example.org Subject: Re: log4php not working properly In-Reply-To: <jessebrown@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: jessebrown@example.org References: <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> hi, the file path is correct, i am on linux.. my php file is in my: /var/www/html/Logging/loggingSamples/logtry.php while the logfile that i supposedly would create is in /var/www/html/logs/ the value of the filename in line 69 is: /var/www/html/logs/20110104.log it has successfully set the filename though... did i missed out on something? thanks a lot.. Christian grobmeier wrote: >=20 > Hello, >=20 > thats weird. It should do as you wrote. > You could check if the file paths comes through correct. > Open the FileAppender and put an echo at line 69: > http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appenders= /LoggerAppenderFile.php?view=3Dmarkup > Check if the folder can be opened and you have access to write to it > (what OS are u using?) >=20 > In windows world you probably need C:\ or something before the path begin= s >=20 > My feeling says, its something related to that - either the filename > param comes to the appender or the path is not correct (because its > used different from php maybe) >=20 > Cheers >=20 > On Tue, Jan 4, 2011 at 8:28 AM, tinkee <jessebrown@example.org> wrote: >> >> >> >> Hi! >> >> thanks a lot for the reply! >> i've figured out the problem already, i think in the fopen part of >> Logger.php >> it could not create the file. >> >> Because i tried to create an empty file with the same title as the >> filename >> that i set in my xml, >> it successfully wrote on the logfile! i read that fopen(), would >> supposedly >> create an unexisting file >> if "w" is specified in the second param. i tried it and i could not get >> it >> to work.. if i dont create a file >> in the path i specified, it could not create the file successfully. >> >> have an idea how to do it? :( >> >> thanks a lot. >> >> >> >> >> >> Christian grobmeier wrote: >>> >>> Hello, >>> >>> http://logging.apache.org/log4php/docs/appenders.html#LoggerAppenderDai= lyFile >>> there is some more which needs to be configured: >>> >>> log4php.appender.default.datePattern =3D Ymd >>> log4php.appender.default.file =3D target/examples/daily_%s.log >>> >>> In your case it should look like: >>> >>> <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> >>> <layout class=3D"LoggerLayoutTTCC" /> >>> >>> >>> =C2=A0</appender> >>> >>> Or similar >>> >>> However, I just reckognized that the xml documentation is far from >>> good. Its no surprise its usage is unclear. >>> >>> Best regards, >>> Christian >>> >>> >>> On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> >>> wrote: >>>> >>>> hi, >>>> >>>> i'm using the log4php for my logging. >>>> specifically the LoggerAppenderDailyFile >>>> but it could not create the logfile successfully. >>>> >>>> >>>> myconfig.xml -->resides in the same level with my php file >>>> -------------------------------------------------------------------- >>>> log4php:configuration >>>> xmlns:log4php=3D"http://logging.apache.org/log4php/" >>>> > >>>> =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderDaily= File'> >>>> >>>> >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> >>>> >>>> >>>> >>>> >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> >>>> =C2=A0 =C2=A0</appender> >>>> =C2=A0 =C2=A0<root> >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> >>>> =C2=A0 =C2=A0</root> >>>> </log4php:configuration> >>>> >>>> >>>> >>>> the php file is this: >>>> <?php >>>> >>>> require_once ('../log4php/php/Logger.php'); >>>> Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); >>>> >>>> //for checking >>>> $temp =3D "hello there!"; >>>> echo $temp; >>>> >>>> $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should be sp= ecified >>>> here >>>> in getLogger? >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random >>>> value >>>> is assigned here >>>> $logger->debug('Hello!'); >>>> >>>> ?> >>>> >>>> >>>> did i miss out on somehting? >>>> >>>> my php version is php5.1.X >>>> and im using the log4php 2.0.0-incubating. >>>> >>>> does the version has any effect? >>>> >>>> thanks a lot. >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p30583406= .html >>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>> >>>> >>> >>> >>> >>> -- >>> http://www.grobmeier.de >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/log4php-not-working-properly-tp30583406p30584450.h= tml >> Sent from the Log4php - Users mailing list jessebrown@example.org. >> >> >=20 >=20 >=20 > --=20 > http://www.grobmeier.de >=20 >=20 --=20 View this message in context: http://old.nabble.com/log4php-not-working-pro= perly-tp30583406p30584545.html Sent from the Log4php - Users mailing list jessebrown@example.org. From log4php-user-returnjessebrown@example.org Tue Jan 04 07:56:36 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 23436 invoked from network); 4 Jan 2011 07:56:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 07:56:36 -0000 Received: (qmail 28717 invoked by uid 500); 4 Jan 2011 07:56:36 -0000 Delivered-To: jessebrown@example.org Received: (qmail 28629 invoked by uid 500); 4 Jan 2011 07:56:35 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 28621 invoked by uid 99); 4 Jan 2011 07:56:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:56:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-iw0-f175.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 07:56:30 +0000 Received: by iwn8 with SMTP id 8so14115570iwn.34 for <jessebrown@example.org>; Mon, 03 Jan 2011 23:56:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=chkme5pXfOXdBnz8S62owqw6QHmBC/U5vVSXkI+zgSk=; b=iq2XRK/PeInB5Uh3FWt26qv3XUfojr+mzJe7GzU0V/5hrCIntIIqqWouxrU29PyrCd SS3X1QSMQZxPm9wSVXKLpqs8idIMgp3GH6xi8elnkKbWsr68sLcKS1FYYnuWOhlqTsFE t97KDBZmkNP/VWHbgM6eyZ3UoXopcuPfCfWpw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=C+x/2xFaTWYSky7HiZVPuL7o26Dy5OiPL95UWN400RJLb2ub/DgnV223PA/0Gw9kPU Ijmg3Pb0RVDDZx/9ACvDaBzh+5kLhX//g+3y6m+KDcvirCKYKU6nCTsQr1IvW98nSZx6 6uSkEurG39JqdVpClEX+ByRfzRPZsbZgUCHxo= Received: by 83.161.120.155 with SMTP id z4mr21922845icy.172.1294127769463; Mon, 03 Jan 2011 23:56:09 -0800 (PST) MIME-Version: 1.0 Received: by 83.161.120.155 with HTTP; Mon, 3 Jan 2011 23:55:49 -0800 (PST) In-Reply-To: <jessebrown@example.org> References: <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> From: Christian Grobmeier <jessebrown@example.org> Date: Tue, 4 Jan 2011 08:55:49 +0100 Message-ID: <jessebrown@example.org> Subject: Re: log4php not working properly To: Log4PHP User <jessebrown@example.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Does your script have write permission in this folder? Your webserver probably does not have the same user as you have > > > > hi, > > the file path is correct, i am on linux.. > > my php file is in my: > /var/www/html/Logging/loggingSamples/logtry.php > > while the logfile that i supposedly would create is in > /var/www/html/logs/ > > the value of the filename in line 69 is: > /var/www/html/logs/20110104.log > > it has successfully set the filename though... > > did i missed out on something? > > thanks a lot.. > > > > > Christian grobmeier wrote: >> >> Hello, >> >> thats weird. It should do as you wrote. >> You could check if the file paths comes through correct. >> Open the FileAppender and put an echo at line 69: >> http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appender= s/LoggerAppenderFile.php?view=3Dmarkup >> Check if the folder can be opened and you have access to write to it >> (what OS are u using?) >> >> In windows world you probably need C:\ or something before the path begi= ns >> >> My feeling says, its something related to that - either the filename >> param comes to the appender or the path is not correct (because its >> used different from php maybe) >> >> Cheers >> >> On Tue, Jan 4, 2011 at 8:28 AM, tinkee <jessebrown@example.org> wrote= : >>> >>> >>> >>> Hi! >>> >>> thanks a lot for the reply! >>> i've figured out the problem already, i think in the fopen part of >>> Logger.php >>> it could not create the file. >>> >>> Because i tried to create an empty file with the same title as the >>> filename >>> that i set in my xml, >>> it successfully wrote on the logfile! i read that fopen(), would >>> supposedly >>> create an unexisting file >>> if "w" is specified in the second param. i tried it and i could not get >>> it >>> to work.. if i dont create a file >>> in the path i specified, it could not create the file successfully. >>> >>> have an idea how to do it? :( >>> >>> thanks a lot. >>> >>> >>> >>> >>> >>> Christian grobmeier wrote: >>>> >>>> Hello, >>>> >>>> http://logging.apache.org/log4php/docs/appenders.html#LoggerAppenderDa= ilyFile >>>> there is some more which needs to be configured: >>>> >>>> log4php.appender.default.datePattern =3D Ymd >>>> log4php.appender.default.file =3D target/examples/daily_%s.log >>>> >>>> In your case it should look like: >>>> >>>> <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> >>>> <layout class=3D"LoggerLayoutTTCC" /> >>>> >>>> >>>> =C2=A0</appender> >>>> >>>> Or similar >>>> >>>> However, I just reckognized that the xml documentation is far from >>>> good. Its no surprise its usage is unclear. >>>> >>>> Best regards, >>>> Christian >>>> >>>> >>>> On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> >>>> wrote: >>>>> >>>>> hi, >>>>> >>>>> i'm using the log4php for my logging. >>>>> specifically the LoggerAppenderDailyFile >>>>> but it could not create the logfile successfully. >>>>> >>>>> >>>>> myconfig.xml -->resides in the same level with my php file >>>>> -------------------------------------------------------------------- >>>>> log4php:configuration >>>>> xmlns:log4php=3D"http://logging.apache.org/log4php/" >>>>> > >>>>> =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderDail= yFile'> >>>>> >>>>> >>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> >>>>> >>>>> >>>>> >>>>> >>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> >>>>> =C2=A0 =C2=A0</appender> >>>>> =C2=A0 =C2=A0<root> >>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> >>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> >>>>> =C2=A0 =C2=A0</root> >>>>> </log4php:configuration> >>>>> >>>>> >>>>> >>>>> the php file is this: >>>>> <?php >>>>> >>>>> require_once ('../log4php/php/Logger.php'); >>>>> Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); >>>>> >>>>> //for checking >>>>> $temp =3D "hello there!"; >>>>> echo $temp; >>>>> >>>>> $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should be s= pecified >>>>> here >>>>> in getLogger? >>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random >>>>> value >>>>> is assigned here >>>>> $logger->debug('Hello!'); >>>>> >>>>> ?> >>>>> >>>>> >>>>> did i miss out on somehting? >>>>> >>>>> my php version is php5.1.X >>>>> and im using the log4php 2.0.0-incubating. >>>>> >>>>> does the version has any effect? >>>>> >>>>> thanks a lot. >>>>> -- >>>>> View this message in context: >>>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p3058340= 6.html >>>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> http://www.grobmeier.de >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/log4php-not-working-properly-tp30583406p30584450.= html >>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>> >>> >> >> >> >> -- >> http://www.grobmeier.de >> >> > > -- > View this message in context: http://old.nabble.com/log4php-not-working-p= roperly-tp30583406p30584545.html > Sent from the Log4php - Users mailing list jessebrown@example.org. > > --=20 http://www.grobmeier.de From log4php-user-returnjessebrown@example.org Tue Jan 04 08:05:47 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 33772 invoked from network); 4 Jan 2011 08:05:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 08:05:47 -0000 Received: (qmail 35717 invoked by uid 500); 4 Jan 2011 08:05:47 -0000 Delivered-To: jessebrown@example.org Received: (qmail 35631 invoked by uid 500); 4 Jan 2011 08:05:45 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 35623 invoked by uid 99); 4 Jan 2011 08:05:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:05:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO sam.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:05:38 +0000 Received: from isper.nabble.com ([83.161.120.155]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from <jessebrown@example.org>) id 1Pa1tO-00085u-1i for jessebrown@example.org; Tue, 04 Jan 2011 00:05:18 -0800 Message-ID: <jessebrown@example.org> Date: Tue, 4 Jan 2011 00:05:18 -0800 (PST) From: tinkee <jessebrown@example.org> To: jessebrown@example.org Subject: Re: log4php not working properly In-Reply-To: <jessebrown@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: jessebrown@example.org References: <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org i set the whole /var/www/html/ to 777 using the terminal..:( i think after creating the file, it does not set it to 755? i tried to insert chmod($filename, 0755);=20 after fopen(), in AppenderFile, but still cannot create.. Christian grobmeier wrote: >=20 > Does your script have write permission in this folder? > Your webserver probably does not have the same user as you have >=20 >> >> >> >> hi, >> >> the file path is correct, i am on linux.. >> >> my php file is in my: >> /var/www/html/Logging/loggingSamples/logtry.php >> >> while the logfile that i supposedly would create is in >> /var/www/html/logs/ >> >> the value of the filename in line 69 is: >> /var/www/html/logs/20110104.log >> >> it has successfully set the filename though... >> >> did i missed out on something? >> >> thanks a lot.. >> >> >> >> >> Christian grobmeier wrote: >>> >>> Hello, >>> >>> thats weird. It should do as you wrote. >>> You could check if the file paths comes through correct. >>> Open the FileAppender and put an echo at line 69: >>> http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appende= rs/LoggerAppenderFile.php?view=3Dmarkup >>> Check if the folder can be opened and you have access to write to it >>> (what OS are u using?) >>> >>> In windows world you probably need C:\ or something before the path >>> begins >>> >>> My feeling says, its something related to that - either the filename >>> param comes to the appender or the path is not correct (because its >>> used different from php maybe) >>> >>> Cheers >>> >>> On Tue, Jan 4, 2011 at 8:28 AM, tinkee <jessebrown@example.org> >>> wrote: >>>> >>>> >>>> >>>> Hi! >>>> >>>> thanks a lot for the reply! >>>> i've figured out the problem already, i think in the fopen part of >>>> Logger.php >>>> it could not create the file. >>>> >>>> Because i tried to create an empty file with the same title as the >>>> filename >>>> that i set in my xml, >>>> it successfully wrote on the logfile! i read that fopen(), would >>>> supposedly >>>> create an unexisting file >>>> if "w" is specified in the second param. i tried it and i could not ge= t >>>> it >>>> to work.. if i dont create a file >>>> in the path i specified, it could not create the file successfully. >>>> >>>> have an idea how to do it? :( >>>> >>>> thanks a lot. >>>> >>>> >>>> >>>> >>>> >>>> Christian grobmeier wrote: >>>>> >>>>> Hello, >>>>> >>>>> http://logging.apache.org/log4php/docs/appenders.html#LoggerAppenderD= ailyFile >>>>> there is some more which needs to be configured: >>>>> >>>>> log4php.appender.default.datePattern =3D Ymd >>>>> log4php.appender.default.file =3D target/examples/daily_%s.log >>>>> >>>>> In your case it should look like: >>>>> >>>>> <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> >>>>> <layout class=3D"LoggerLayoutTTCC" /> >>>>> >>>>> >>>>> =C2=A0</appender> >>>>> >>>>> Or similar >>>>> >>>>> However, I just reckognized that the xml documentation is far from >>>>> good. Its no surprise its usage is unclear. >>>>> >>>>> Best regards, >>>>> Christian >>>>> >>>>> >>>>> On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> >>>>> wrote: >>>>>> >>>>>> hi, >>>>>> >>>>>> i'm using the log4php for my logging. >>>>>> specifically the LoggerAppenderDailyFile >>>>>> but it could not create the logfile successfully. >>>>>> >>>>>> >>>>>> myconfig.xml -->resides in the same level with my php file >>>>>> -------------------------------------------------------------------- >>>>>> log4php:configuration >>>>>> xmlns:log4php=3D"http://logging.apache.org/log4php/" >>>>>> > >>>>>> =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderDai= lyFile'> >>>>>> >>>>>> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> >>>>>> =C2=A0 =C2=A0</appender> >>>>>> =C2=A0 =C2=A0<root> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> >>>>>> =C2=A0 =C2=A0</root> >>>>>> </log4php:configuration> >>>>>> >>>>>> >>>>>> >>>>>> the php file is this: >>>>>> <?php >>>>>> >>>>>> require_once ('../log4php/php/Logger.php'); >>>>>> Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); >>>>>> >>>>>> //for checking >>>>>> $temp =3D "hello there!"; >>>>>> echo $temp; >>>>>> >>>>>> $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should be >>>>>> specified >>>>>> here >>>>>> in getLogger? >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random >>>>>> value >>>>>> is assigned here >>>>>> $logger->debug('Hello!'); >>>>>> >>>>>> ?> >>>>>> >>>>>> >>>>>> did i miss out on somehting? >>>>>> >>>>>> my php version is php5.1.X >>>>>> and im using the log4php 2.0.0-incubating. >>>>>> >>>>>> does the version has any effect? >>>>>> >>>>>> thanks a lot. >>>>>> -- >>>>>> View this message in context: >>>>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p305834= 06.html >>>>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> http://www.grobmeier.de >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p30584450= .html >>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>> >>>> >>> >>> >>> >>> -- >>> http://www.grobmeier.de >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/log4php-not-working-properly-tp30583406p30584545.h= tml >> Sent from the Log4php - Users mailing list jessebrown@example.org. >> >> >=20 >=20 >=20 > --=20 > http://www.grobmeier.de >=20 >=20 --=20 View this message in context: http://old.nabble.com/log4php-not-working-pro= perly-tp30583406p30584594.html Sent from the Log4php - Users mailing list jessebrown@example.org. From log4php-user-returnjessebrown@example.org Tue Jan 04 08:16:01 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 35900 invoked from network); 4 Jan 2011 08:16:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 08:16:01 -0000 Received: (qmail 43407 invoked by uid 500); 4 Jan 2011 08:16:01 -0000 Delivered-To: jessebrown@example.org Received: (qmail 43322 invoked by uid 500); 4 Jan 2011 08:16:00 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 43314 invoked by uid 99); 4 Jan 2011 08:15:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:15:59 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO sam.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:15:54 +0000 Received: from isper.nabble.com ([83.161.120.155]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from <jessebrown@example.org>) id 1Pa23J-0000Gq-V5 for jessebrown@example.org; Tue, 04 Jan 2011 00:15:33 -0800 Message-ID: <jessebrown@example.org> Date: Tue, 4 Jan 2011 00:15:33 -0800 (PST) From: tinkee <jessebrown@example.org> To: jessebrown@example.org Subject: Re: log4php not working properly In-Reply-To: <jessebrown@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: jessebrown@example.org References: <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> and also i am operating as root...=20 tinkee wrote: >=20 >=20 > i set the whole /var/www/html/ to 777 using the terminal..:( > i think after creating the file, it does not set it to 755? > i tried to insert >=20 > chmod($filename, 0755);=20 >=20 > after fopen(), in AppenderFile, but still cannot create.. >=20 >=20 >=20 > Christian grobmeier wrote: >>=20 >> Does your script have write permission in this folder? >> Your webserver probably does not have the same user as you have >>=20 >>> >>> >>> >>> hi, >>> >>> the file path is correct, i am on linux.. >>> >>> my php file is in my: >>> /var/www/html/Logging/loggingSamples/logtry.php >>> >>> while the logfile that i supposedly would create is in >>> /var/www/html/logs/ >>> >>> the value of the filename in line 69 is: >>> /var/www/html/logs/20110104.log >>> >>> it has successfully set the filename though... >>> >>> did i missed out on something? >>> >>> thanks a lot.. >>> >>> >>> >>> >>> Christian grobmeier wrote: >>>> >>>> Hello, >>>> >>>> thats weird. It should do as you wrote. >>>> You could check if the file paths comes through correct. >>>> Open the FileAppender and put an echo at line 69: >>>> http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/append= ers/LoggerAppenderFile.php?view=3Dmarkup >>>> Check if the folder can be opened and you have access to write to it >>>> (what OS are u using?) >>>> >>>> In windows world you probably need C:\ or something before the path >>>> begins >>>> >>>> My feeling says, its something related to that - either the filename >>>> param comes to the appender or the path is not correct (because its >>>> used different from php maybe) >>>> >>>> Cheers >>>> >>>> On Tue, Jan 4, 2011 at 8:28 AM, tinkee <jessebrown@example.org> >>>> wrote: >>>>> >>>>> >>>>> >>>>> Hi! >>>>> >>>>> thanks a lot for the reply! >>>>> i've figured out the problem already, i think in the fopen part of >>>>> Logger.php >>>>> it could not create the file. >>>>> >>>>> Because i tried to create an empty file with the same title as the >>>>> filename >>>>> that i set in my xml, >>>>> it successfully wrote on the logfile! i read that fopen(), would >>>>> supposedly >>>>> create an unexisting file >>>>> if "w" is specified in the second param. i tried it and i could not >>>>> get >>>>> it >>>>> to work.. if i dont create a file >>>>> in the path i specified, it could not create the file successfully. >>>>> >>>>> have an idea how to do it? :( >>>>> >>>>> thanks a lot. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Christian grobmeier wrote: >>>>>> >>>>>> Hello, >>>>>> >>>>>> http://logging.apache.org/log4php/docs/appenders.html#LoggerAppender= DailyFile >>>>>> there is some more which needs to be configured: >>>>>> >>>>>> log4php.appender.default.datePattern =3D Ymd >>>>>> log4php.appender.default.file =3D target/examples/daily_%s.log >>>>>> >>>>>> In your case it should look like: >>>>>> >>>>>> <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> >>>>>> <layout class=3D"LoggerLayoutTTCC" /> >>>>>> >>>>>> >>>>>> =C2=A0</appender> >>>>>> >>>>>> Or similar >>>>>> >>>>>> However, I just reckognized that the xml documentation is far from >>>>>> good. Its no surprise its usage is unclear. >>>>>> >>>>>> Best regards, >>>>>> Christian >>>>>> >>>>>> >>>>>> On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> >>>>>> wrote: >>>>>>> >>>>>>> hi, >>>>>>> >>>>>>> i'm using the log4php for my logging. >>>>>>> specifically the LoggerAppenderDailyFile >>>>>>> but it could not create the logfile successfully. >>>>>>> >>>>>>> >>>>>>> myconfig.xml -->resides in the same level with my php file >>>>>>> -------------------------------------------------------------------= - >>>>>>> log4php:configuration >>>>>>> xmlns:log4php=3D"http://logging.apache.org/log4php/" >>>>>>> > >>>>>>> =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderDa= ilyFile'> >>>>>>> >>>>>>> >>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> >>>>>>> =C2=A0 =C2=A0</appender> >>>>>>> =C2=A0 =C2=A0<root> >>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> >>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> >>>>>>> =C2=A0 =C2=A0</root> >>>>>>> </log4php:configuration> >>>>>>> >>>>>>> >>>>>>> >>>>>>> the php file is this: >>>>>>> <?php >>>>>>> >>>>>>> require_once ('../log4php/php/Logger.php'); >>>>>>> Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); >>>>>>> >>>>>>> //for checking >>>>>>> $temp =3D "hello there!"; >>>>>>> echo $temp; >>>>>>> >>>>>>> $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should be >>>>>>> specified >>>>>>> here >>>>>>> in getLogger? >>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random >>>>>>> value >>>>>>> is assigned here >>>>>>> $logger->debug('Hello!'); >>>>>>> >>>>>>> ?> >>>>>>> >>>>>>> >>>>>>> did i miss out on somehting? >>>>>>> >>>>>>> my php version is php5.1.X >>>>>>> and im using the log4php 2.0.0-incubating. >>>>>>> >>>>>>> does the version has any effect? >>>>>>> >>>>>>> thanks a lot. >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p30583= 406.html >>>>>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> http://www.grobmeier.de >>>>>> >>>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p3058445= 0.html >>>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> http://www.grobmeier.de >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/log4php-not-working-properly-tp30583406p30584545.= html >>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>> >>> >>=20 >>=20 >>=20 >> --=20 >> http://www.grobmeier.de >>=20 >>=20 >=20 >=20 --=20 View this message in context: http://old.nabble.com/log4php-not-working-pro= perly-tp30583406p30584645.html Sent from the Log4php - Users mailing list jessebrown@example.org. From log4php-user-returnjessebrown@example.org Tue Jan 04 08:21:08 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 36919 invoked from network); 4 Jan 2011 08:21:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 08:21:08 -0000 Received: (qmail 47050 invoked by uid 500); 4 Jan 2011 08:21:08 -0000 Delivered-To: jessebrown@example.org Received: (qmail 46966 invoked by uid 500); 4 Jan 2011 08:21:06 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 46957 invoked by uid 99); 4 Jan 2011 08:21:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:21:05 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-iw0-f175.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:21:01 +0000 Received: by iwn8 with SMTP id 8so14127653iwn.34 for <jessebrown@example.org>; Tue, 04 Jan 2011 00:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=HwSNDdquoDcwCGIb1UEGbgcLU+waUQ6k+mOH5WKg/5I=; b=aOxIGmC72suvCzhAPldCEXtk7HMJdeJHWs3H+dpj6P1YZPCUVaeZ1mbxevl5vCJ2/K iIxSBsB1Q9BIUYBasMA0BrrqsLIkyZyExEgLGk97jvVvKdtt/N/INNAsRFbKWharImuc /+GIeJNit4YY9I7hvdcwuZQtY7KTPFgIWCJzQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=UIQjPSKqrxMmkuZo2+XCb6OtNYWiC8aMGkfiv5CHAKyyBaCmqTv7UYLWUUoprwWEBp FBkF1QKGGbe/HIugtbgRx9nJ3c8bMA+kMuJxwHwhTeAguIyhp+SCWfs5JZ+zNpWyK/zB gA8YcYZCbFCjKMbiEh5elrK7JC6fCf90IbaAQ= Received: by 83.161.120.155 with SMTP id it7mr21869809icb.507.1294129240712; Tue, 04 Jan 2011 00:20:40 -0800 (PST) MIME-Version: 1.0 Received: by 83.161.120.155 with HTTP; Tue, 4 Jan 2011 00:20:20 -0800 (PST) In-Reply-To: <jessebrown@example.org> References: <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> From: Christian Grobmeier <jessebrown@example.org> Date: Tue, 4 Jan 2011 09:20:20 +0100 Message-ID: <jessebrown@example.org> Subject: Re: log4php not working properly To: Log4PHP User <jessebrown@example.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable actually i am lack of ideas now... what php version are u using exaclty? On Tue, Jan 4, 2011 at 9:15 AM, tinkee <jessebrown@example.org> wrote: > > > and also i am operating as root... > > > > tinkee wrote: >> >> >> i set the whole /var/www/html/ to 777 using the terminal..:( >> i think after creating the file, it does not set it to 755? >> i tried to insert >> >> chmod($filename, 0755); >> >> after fopen(), in AppenderFile, but still cannot create.. >> >> >> >> Christian grobmeier wrote: >>> >>> Does your script have write permission in this folder? >>> Your webserver probably does not have the same user as you have >>> >>>> >>>> >>>> >>>> hi, >>>> >>>> the file path is correct, i am on linux.. >>>> >>>> my php file is in my: >>>> /var/www/html/Logging/loggingSamples/logtry.php >>>> >>>> while the logfile that i supposedly would create is in >>>> /var/www/html/logs/ >>>> >>>> the value of the filename in line 69 is: >>>> /var/www/html/logs/20110104.log >>>> >>>> it has successfully set the filename though... >>>> >>>> did i missed out on something? >>>> >>>> thanks a lot.. >>>> >>>> >>>> >>>> >>>> Christian grobmeier wrote: >>>>> >>>>> Hello, >>>>> >>>>> thats weird. It should do as you wrote. >>>>> You could check if the file paths comes through correct. >>>>> Open the FileAppender and put an echo at line 69: >>>>> http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appen= ders/LoggerAppenderFile.php?view=3Dmarkup >>>>> Check if the folder can be opened and you have access to write to it >>>>> (what OS are u using?) >>>>> >>>>> In windows world you probably need C:\ or something before the path >>>>> begins >>>>> >>>>> My feeling says, its something related to that - either the filename >>>>> param comes to the appender or the path is not correct (because its >>>>> used different from php maybe) >>>>> >>>>> Cheers >>>>> >>>>> On Tue, Jan 4, 2011 at 8:28 AM, tinkee <jessebrown@example.org> >>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> Hi! >>>>>> >>>>>> thanks a lot for the reply! >>>>>> i've figured out the problem already, i think in the fopen part of >>>>>> Logger.php >>>>>> it could not create the file. >>>>>> >>>>>> Because i tried to create an empty file with the same title as the >>>>>> filename >>>>>> that i set in my xml, >>>>>> it successfully wrote on the logfile! i read that fopen(), would >>>>>> supposedly >>>>>> create an unexisting file >>>>>> if "w" is specified in the second param. i tried it and i could not >>>>>> get >>>>>> it >>>>>> to work.. if i dont create a file >>>>>> in the path i specified, it could not create the file successfully. >>>>>> >>>>>> have an idea how to do it? :( >>>>>> >>>>>> thanks a lot. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Christian grobmeier wrote: >>>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> http://logging.apache.org/log4php/docs/appenders.html#LoggerAppende= rDailyFile >>>>>>> there is some more which needs to be configured: >>>>>>> >>>>>>> log4php.appender.default.datePattern =3D Ymd >>>>>>> log4php.appender.default.file =3D target/examples/daily_%s.log >>>>>>> >>>>>>> In your case it should look like: >>>>>>> >>>>>>> <appender name=3D"logged_it" class=3D'LoggerAppenderDailyFile'> >>>>>>> <layout class=3D"LoggerLayoutTTCC" /> >>>>>>> >>>>>>> >>>>>>> =C2=A0</appender> >>>>>>> >>>>>>> Or similar >>>>>>> >>>>>>> However, I just reckognized that the xml documentation is far from >>>>>>> good. Its no surprise its usage is unclear. >>>>>>> >>>>>>> Best regards, >>>>>>> Christian >>>>>>> >>>>>>> >>>>>>> On Tue, Jan 4, 2011 at 3:24 AM, tinkee <jessebrown@example.org> >>>>>>> wrote: >>>>>>>> >>>>>>>> hi, >>>>>>>> >>>>>>>> i'm using the log4php for my logging. >>>>>>>> specifically the LoggerAppenderDailyFile >>>>>>>> but it could not create the logfile successfully. >>>>>>>> >>>>>>>> >>>>>>>> myconfig.xml -->resides in the same level with my php file >>>>>>>> ------------------------------------------------------------------= -- >>>>>>>> log4php:configuration >>>>>>>> xmlns:log4php=3D"http://logging.apache.org/log4php/" >>>>>>>> > >>>>>>>> =C2=A0 =C2=A0<appender name=3D"logged_it" class=3D'LoggerAppenderD= ailyFile'> >>>>>>>> >>>>>>>> >>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<layout class=3D"LoggerLayoutTTCC"> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0</layout> >>>>>>>> =C2=A0 =C2=A0</appender> >>>>>>>> =C2=A0 =C2=A0<root> >>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<level value=3D"debug" /> >>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<appender_ref ref=3D"logged_it" /> >>>>>>>> =C2=A0 =C2=A0</root> >>>>>>>> </log4php:configuration> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> the php file is this: >>>>>>>> <?php >>>>>>>> >>>>>>>> require_once ('../log4php/php/Logger.php'); >>>>>>>> Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onfigure('myconfig.xml'); >>>>>>>> >>>>>>>> //for checking >>>>>>>> $temp =3D "hello there!"; >>>>>>>> echo $temp; >>>>>>>> >>>>>>>> $logger =3D Logger888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLogger('myLogger'); =C2=A0 -->what should b= e >>>>>>>> specified >>>>>>>> here >>>>>>>> in getLogger? >>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-->a random >>>>>>>> value >>>>>>>> is assigned here >>>>>>>> $logger->debug('Hello!'); >>>>>>>> >>>>>>>> ?> >>>>>>>> >>>>>>>> >>>>>>>> did i miss out on somehting? >>>>>>>> >>>>>>>> my php version is php5.1.X >>>>>>>> and im using the log4php 2.0.0-incubating. >>>>>>>> >>>>>>>> does the version has any effect? >>>>>>>> >>>>>>>> thanks a lot. >>>>>>>> -- >>>>>>>> View this message in context: >>>>>>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p3058= 3406.html >>>>>>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> http://www.grobmeier.de >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p305844= 50.html >>>>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> http://www.grobmeier.de >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/log4php-not-working-properly-tp30583406p30584545= .html >>>> Sent from the Log4php - Users mailing list jessebrown@example.org. >>>> >>>> >>> >>> >>> >>> -- >>> http://www.grobmeier.de >>> >>> >> >> > > -- > View this message in context: http://old.nabble.com/log4php-not-working-p= roperly-tp30583406p30584645.html > Sent from the Log4php - Users mailing list jessebrown@example.org. > > --=20 http://www.grobmeier.de From log4php-user-returnjessebrown@example.org Tue Jan 04 08:29:54 2011 Return-Path: <log4php-user-returnjessebrown@example.org> Delivered-To: jessebrown@example.org Received: (qmail 38862 invoked from network); 4 Jan 2011 08:29:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jan 2011 08:29:54 -0000 Received: (qmail 59867 invoked by uid 500); 4 Jan 2011 08:29:54 -0000 Delivered-To: jessebrown@example.org Received: (qmail 59751 invoked by uid 500); 4 Jan 2011 08:29:52 -0000 Mailing-List: contact jessebrown@example.org; run by ezmlm Precedence: bulk list-help: <mailto:jessebrown@example.org> list-unsubscribe: <mailto:jessebrown@example.org> List-Post: <mailto:jessebrown@example.org> Reply-To: "Log4PHP User" <jessebrown@example.org> List-Id: <log4php-user.logging.apache.org> Delivered-To: mailing list jessebrown@example.org Received: (qmail 59725 invoked by uid 99); 4 Jan 2011 08:29:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:29:51 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jessebrown@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO sam.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 08:29:44 +0000 Received: from isper.nabble.com ([83.161.120.155]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from <jessebrown@example.org>) id 1Pa2Gh-0001C7-Ij for jessebrown@example.org; Tue, 04 Jan 2011 00:29:23 -0800 Message-ID: <jessebrown@example.org> Date: Tue, 4 Jan 2011 00:29:23 -0800 (PST) From: tinkee <jessebrown@example.org> To: jessebrown@example.org Subject: Re: log4php not working properly In-Reply-To: <jessebrown@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: jessebrown@example.org References: <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> <jessebrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org iam on php 5.1.6... i also noticed that in the echo result in line 69 of AppenderFile, the one you told me earlier, the value is only: /var/www/html/logs/ and not the same value that was passed in getFile() which was: /var/www/html/logs/20110104.log the filename itself was not carried over.. you think something went wrong? thanks a lot for all the ideas. big help. :) Christian grobmeier wrote: >=20 > actually i am lack of ideas now... what php version are u using exaclty? >=20 > On Tue, Jan 4, 2011 at 9:15 AM, tinkee <jessebrown@example.org> wrote: >> >> >> and also i am operating as root... >> >> >> >> tinkee wrote: >>> >>> >>> i set the whole /var/www/html/ to 777 using the terminal..:( >>> i think after creating the file, it does not set it to 755? >>> i tried to insert >>> >>> chmod($filename, 0755); >>> >>> after fopen(), in AppenderFile, but still cannot create.. >>> >>> >>> >>> Christian grobmeier wrote: >>>> >>>> Does your
{'source': 'Apache Software Foundation Public Mail Archives'}