You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(38) |
Sep
(126) |
Oct
(23) |
Nov
(72) |
Dec
(36) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(76) |
Feb
(32) |
Mar
(19) |
Apr
(6) |
May
(54) |
Jun
(40) |
Jul
(45) |
Aug
(35) |
Sep
(51) |
Oct
(67) |
Nov
(10) |
Dec
(50) |
2004 |
Jan
(51) |
Feb
(22) |
Mar
(22) |
Apr
(28) |
May
(53) |
Jun
(99) |
Jul
(38) |
Aug
(49) |
Sep
(23) |
Oct
(29) |
Nov
(30) |
Dec
(48) |
2005 |
Jan
(15) |
Feb
(21) |
Mar
(25) |
Apr
(16) |
May
(131) |
Jun
|
Jul
(8) |
Aug
(5) |
Sep
(15) |
Oct
|
Nov
(15) |
Dec
(12) |
2006 |
Jan
(15) |
Feb
(20) |
Mar
(8) |
Apr
(10) |
May
(3) |
Jun
(16) |
Jul
(15) |
Aug
(11) |
Sep
(17) |
Oct
(27) |
Nov
(11) |
Dec
(12) |
2007 |
Jan
(19) |
Feb
(18) |
Mar
(33) |
Apr
(4) |
May
(15) |
Jun
(22) |
Jul
(19) |
Aug
(20) |
Sep
(14) |
Oct
(4) |
Nov
(34) |
Dec
(11) |
2008 |
Jan
(8) |
Feb
(18) |
Mar
(2) |
Apr
(4) |
May
(26) |
Jun
(9) |
Jul
(8) |
Aug
(8) |
Sep
(3) |
Oct
(17) |
Nov
(14) |
Dec
(4) |
2009 |
Jan
(6) |
Feb
(41) |
Mar
(21) |
Apr
(10) |
May
(21) |
Jun
|
Jul
(8) |
Aug
(4) |
Sep
(3) |
Oct
(8) |
Nov
(6) |
Dec
(5) |
2010 |
Jan
(14) |
Feb
(13) |
Mar
(7) |
Apr
(12) |
May
(4) |
Jun
(1) |
Jul
(11) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(10) |
Dec
|
2011 |
Jan
(7) |
Feb
(3) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(1) |
Jul
(6) |
Aug
(6) |
Sep
(10) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2012 |
Jan
(4) |
Feb
(5) |
Mar
(1) |
Apr
(7) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(5) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2013 |
Jan
(6) |
Feb
|
Mar
(14) |
Apr
(9) |
May
(3) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(6) |
2014 |
Jan
|
Feb
(1) |
Mar
(10) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: <own...@NE...> - 2004-06-13 15:34:26
|
--> Error description: Error-For: PHI...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:25
|
--> Error description: Error-For: TZ...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:23
|
--> Error description: Error-For: BFR...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:23
|
--> Error description: Error-For: DEV...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:23
|
--> Error description: Error-For: KNU...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:23
|
--> Error description: Error-For: TO...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:21
|
--> Error description: Error-For: MAJ...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:21
|
--> Error description: Error-For: SN...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:21
|
--> Error description: Error-For: KE...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:20
|
--> Error description: Error-For: HE...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: <own...@NE...> - 2004-06-13 15:34:20
|
--> Error description: Error-For: J.L...@NE... Error-Code: 3 Error-Text: No such list. Error-End: One error reported. |
From: Mike S. <m...@pe...> - 2004-06-13 07:14:28
|
Kevin Goess wrote on 6/8/2004, 1:00 AM: > So I'm pretty sure it's the closure that's the problem. With the > "return sub{}" change in generate_coderef(), putting a while loop around > the above code and running it forever doesn't use up any memory. Great detective work, thanks, Kevin! With your analysis, I was able to reduce it to this simple case: package Foo; sub new { bless {} } sub DESTROY { warn "Destroying Foo"; } sub coderef { my $bar = Bar->new(); my $cref; eval "\$cref = sub { \$bar };"; return $cref; } package Bar; sub new { bless {} } sub DESTROY { warn "Destroying Bar"; } package main; my $foo = Foo->new(); $foo->{bar} = $foo->coderef(); This shows: Destroying Foo at ml line 4. Destroying Bar at ml line 13 during global destruction. If you change the code slightly to package Foo; sub new { bless {} } sub DESTROY { warn "Destroying Foo"; } sub coderef { my $bar = Bar->new(); my $cref; $cref = eval "sub { \$bar };"; return $cref; } package Bar; sub new { bless {} } sub DESTROY { warn "Destroying Bar"; } package main; my $foo = Foo->new(); $foo->{bar} = $foo->coderef(); which pulls the assignment out of the "eval", then you'll get Destroying Foo at ml line 4. Destroying Bar at ml line 13. And, alas, if we apply the following patch to Log4perl, the leak's gone, yay :) Index: lib/Log/Log4perl/Logger.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Logger.pm,v retrieving revision 1.61 diff -a -u -r1.61 Logger.pm --- lib/Log/Log4perl/Logger.pm 6 Jun 2004 19:47:29 -0000 1.61 +++ lib/Log/Log4perl/Logger.pm 13 Jun 2004 07:00:34 -0000 @@ -233,7 +233,7 @@ } my $code = <<EOL; - \$coderef = sub { + sub { my (\$logger) = shift; my (\$level) = pop; my \$message; @@ -288,7 +288,7 @@ EOL - eval $code or die "$@"; + $coderef = eval $code or die "$@"; return $coderef; } Now the $1,000,000 question ... who can explain this? :) -- -- Mike Mike Schilli m...@pe... |
From: shlee <de...@t-...> - 2004-06-11 12:29:37
|
Здравствуйте, уважаемые коллеги! Поздравляем Вас с наступлением лета и предлагаем Вашему вниманию не имеющее аналогов предложение: приобретение видеозаписей семинаров в области кадрового менеджмента, а также бухгалтерского учета, налогообложения. Новые технологии и разработки в области подготовки и переподготовки кадров,последние изменения в законодательстве, актуальные вопросы налогообложения,а также многое другое найдет отражение в предлагаемых Вам записях. В июне месяце Вы сможете приобрести видеоматериалы по следующим темам: 1.Разработка системы мотивации персонала в организации (в двухдневном формате). 2.Технология оценки и подбора персонала в организации (в двухдневном формате), а также: 3.Заработная плата: бухгалтерский и налоговый аспект. 4.Хозяйственные договоры в бухгалтерском учете и налогообложении. 5.Упрощенная система налогообложения. 6.Особенности взаимоотношений с контролирующими органами. 7.Основы инвестиционно - строительной деятельности. 8.Единый социальный налог. Налог на доходы физических лиц. 9.Иностранные сотрудники: особенности трудовых отношений и налогообложения. 10. Учет амортизируемого имущества В течение всего месяца в нашем Центре будет действовать летняя акция: при приобретениии 3-х комплектов из перечисленных видеосеминаров и тренингов, четвертый - Вы получаете бесплатно. Ко всем видеозаписям прилагаются авторские раздаточные материалы. Стоимость комплектов видеокассет по каждой из предложенных тем в однодневном формате - 2600 рублей, с учетом НДС, в двухдневном формате - 4500 рублей, с учетом НДС. Оплата производится либо по наличному, либо по безналичному расчету. Видеокурсы предлагаются на DVD-дисках и видеокассетах. В ближайшее время в продаже появятся записи новых семинаров, о темах которых Вы сможете узнать, позвонив по контактным телефонам, либо, связавшись с нами по электронной почте. КОНТАКТНЫЕ ТЕЛЕФОНЫ: (095) 788 7328. |
From: Mike S. <m...@pe...> - 2004-06-11 00:40:38
|
Viner, David wrote on 6/10/2004, 11:46 AM: > Here's a patch including documentation for adding the is<Level>Enabled() Applied with shortened doc. I left out the test case, since these are just aliases. Thanks! -- -- Mike Mike Schilli m...@pe... |
From: Viner, D. <dv...@ya...> - 2004-06-10 18:50:43
|
Here's a patch including documentation for adding the is<Level>Enabled() methods to log4perl. These are the standard Log4x style of method naming... so this is really just for compatibility. I've also attached a simple test case to ensure that the isXxxEnabled() and is_xxx() methods return the same value. 048Log4J-compat.t should live under the t/ subdir. (I couldn't seem to get cvs diff to do that for me... is there some secret that I am missing? cvs diff -N seems like it should do it, but somehow it just doesn't) thanks dave -----Original Message----- From: Mike Schilli [mailto:m...@pe...] Sent: Monday, March 29, 2004 3:57 PM To: Viner David Subject: RE: [log4perl-devel] log4perl and log4j Viner, David wrote on 3/29/2004, 10:14 AM: > what do you think about a couple of compatibility functions to support > the > identical syntax ? e.g., : > > sub isDebugEnabled { return shift->is_debug(); } Sure. Patches including test cases and documentation are welcome. -- -- Mike Mike Schilli m...@pe... |
From: Susan A. <sa...@me...> - 2004-06-10 16:51:35
|
I will be out of the office Monday, June 7, 2004, through Wednesday, June 16, 2004. Your message has been received and will be read when I return to the office on Thursday, June 17, 2004. If you need immediate assistance, please call my assistant, Carol Ziegler, at 734.763.5458. Thank you. |
From: <MAI...@bl...> - 2004-06-10 16:50:17
|
The following errors occurred when trying to deliver the attached mail: mvoase: User unknown abb37: User unknown dilip: User unknown zedlwski: User unknown trawick: User unknown ake: User unknown Tim Costello: User unknown bmartin: User unknown wrowe: User has no email address registered. Name, title, postal address and phone for 'wrowe': wrowe No title or description registered No postal address registered No phone number registered slive: User unknown clkao: User unknown timcostello: User unknown ask: User has no email address registered. Name, title, postal address and phone for 'ask': ask No title or description registered No postal address registered No phone number registered KEIJSERJJ: User unknown tylerjbrooks: User unknown ddhill: User unknown gnicholls: User unknown jmorris: User has no email address registered. Name, title, postal address and phone for 'jmorris': jmorris No title or description registered No postal address registered No phone number registered kuriyama: User unknown Tadu: User unknown v j orlikowski: User unknown stric: User unknown carsten klapp: User unknown ki: User unknown brane: User unknown mgyger: User unknown alexeyt: User unknown dduvall: User unknown tanaka: User has no email address registered. Name, title, postal address and phone for 'tanaka': James Y Rhee 1 HOUSE OFFICER VI, UMH H.O. Core Internal Med Student, Medical No postal address registered No phone number registered new-httpd: User unknown cliffwoolley: User unknown andre breiler: User unknown drench: User unknown jtravis: User unknown simo: User unknown ------- The original message sent: Received: from oilandwater.mr.itd.umich.edu (oilandwater.mr.itd.umich.edu [141.211.93.145]) by bloodwork.mr.itd.umich.edu (mail500) with ESMTP id i5AGoB7G006032; Thu, 10 Jun 2004 12:50:11 -0400 (EDT) Received: from jjddq.net (E7002.e.pppool.de [194.97.112.2]) by oilandwater.mr.itd.umich.edu (umich) with SMTP id i5AGo2Vo003885; Thu, 10 Jun 2004 12:50:02 -0400 From: log...@li... Date: Thu, 10 Jun 2004 15:48:31 GMT MIME-Version: 1.0 Subject: Libanesen in Berlin -Id:1313- Importance: Normal X-Mailer: Mail-SMTP V8.36 X-Priority: 3 (Normal) Message-ID: <817...@li...> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" Habe eben im Fernsehen einen Bericht gesehen, in dem klar hervorging, dass libenesiche und kurdische Moslems in Berlin die Drogenszene und teilweise sogar das Rotlicht-Milieu beherrschen. Der Clou an der Geschichte ist jedoch, dass die Libanesen, die in kriminelle Aktivitaeten verwickelt und Millionen scheffeln, ebenfalls vor dem Sozialamt erscheinen um ihre Sozialhilfe einzufordern. In einigen Szenen im Berliner Sozialamt, konnte man vor lauter Kopftuecher nicht einmal mehr die Waende sehen!Wenn man da bedenkt, dass die Gruenen sich im Moment gegen ein strengeres Immigrations-und Asylgesetz querlegen, kann man nur noch mit Hoffnungslosigkeit und Kopfschuetteln reagieren. Interessant an dem Bericht war ebenfalls, dass Justiz und Politik bisher nicht mit der gebotenen Staerke gegen solche Umtriebe vorgegangen ist, aus Angst man koennte ihnen Auslaenderfeindlichkeit und Rechtslastigkeit vorwerfen! Die Auswirkungen von soviel Dummheit und falscher Toleranz werden wir noch alle ! bitter bereuen muessen! |
From: les <pi...@t-...> - 2004-06-10 08:14:35
|
Здравствуйте, уважаемые коллеги! Поздравляем Вас с наступлением лета и предлагаем Вашему вниманию не имеющее аналогов предложение: приобретение видеозаписей семинаров в области кадрового менеджмента, а также бухгалтерского учета, налогообложения. Новые технологии и разработки в области подготовки и переподготовки кадров,последние изменения в законодательстве, актуальные вопросы налогообложения,а также многое другое найдет отражение в предлагаемых Вам записях. В июне месяце Вы сможете приобрести видеоматериалы по следующим темам: 1.Разработка системы мотивации персонала в организации (в двухдневном формате). 2.Технология оценки и подбора персонала в организации (в двухдневном формате), а также: 3.Заработная плата: бухгалтерский и налоговый аспект. 4.Хозяйственные договоры в бухгалтерском учете и налогообложении. 5.Упрощенная система налогообложения. 6.Особенности взаимоотношений с контролирующими органами. 7.Основы инвестиционно - строительной деятельности. 8.Единый социальный налог. Налог на доходы физических лиц. 9.Иностранные сотрудники: особенности трудовых отношений и налогообложения. 10. Учет амортизируемого имущества В течение всего месяца в нашем Центре будет действовать летняя акция: при приобретениии 3-х комплектов из перечисленных видеосеминаров и тренингов, четвертый - Вы получаете бесплатно. Ко всем видеозаписям прилагаются авторские раздаточные материалы. Стоимость комплектов видеокассет по каждой из предложенных тем в однодневном формате - 2600 рублей, с учетом НДС, в двухдневном формате - 4500 рублей, с учетом НДС. Оплата производится либо по наличному, либо по безналичному расчету. Видеокурсы предлагаются на DVD-дисках и видеокассетах. В ближайшее время в продаже появятся записи новых семинаров, о темах которых Вы сможете узнать, позвонив по контактным телефонам, либо, связавшись с нами по электронной почте. КОНТАКТНЫЕ ТЕЛЕФОНЫ: (095) 788 7328. |
From: Mike S. <m...@pe...> - 2004-06-08 15:41:56
|
Maciej Walezak wrote on 6/8/2004, 6:58 AM: > You can see that the $@ variable is empty. It happens if the get_logger > subroutine is called from the DESTROY method when an objects is going > out > of scope. No DESTROY or no get_logger and the program works fine. I am > very curious what is wrong here. I don't think this is related to Log4perl. You can reproduce the same effect using sub DESTROY { #get_logger; $@ = undef; } If you run code in DESTROY (which gets triggered while leaving the eval { } block because your object goes out of scope) that's resetting $@, you'll get this weird behaviour. If you still want this code to be called, just localize $@: sub DESTROY { #get_logger; local $@; $@ = undef; } -- -- Mike Mike Schilli m...@pe... > Hello Log4Perl team! > > I have experienced this problem since version 0.32 of Log4Perl. The > effect > is exactly the same on Linux, AIX or Windows with Perl 5.6 or Perl 5.8 > so > I will not give exact platform specification. > Run this code to reproduce the problem: > > #!/usr/bin/perl > > package Base; > use Log::Log4perl qw(get_logger); > sub new { > return bless {}, shift; > } > sub DESTROY { > get_logger; > } > 1; > > eval { > my $b = Base->new; > die "this is the exception"; > }; > > if ($@) { > print "Caught exception: >$@<\n"; > } else { > print "No exception\n"; > } > > You can see that the $@ variable is empty. It happens if the get_logger > subroutine is called from the DESTROY method when an objects is going > out > of scope. No DESTROY or no get_logger and the program works fine. I am > very curious what is wrong here. > > Please reply to my private mailbox too as I do not subscribe to this > list. > -- > Maciej Walezak |
From: Maciej W. <mac...@li...> - 2004-06-08 11:57:23
|
Hello Log4Perl team! I have experienced this problem since version 0.32 of Log4Perl. The effec= t =20 is exactly the same on Linux, AIX or Windows with Perl 5.6 or Perl 5.8 so= =20 I will not give exact platform specification. Run this code to reproduce the problem: #!/usr/bin/perl package Base; use Log::Log4perl qw(get_logger); sub new { return bless {}, shift; } sub DESTROY { get_logger; } 1; eval { my $b =3D Base->new; die "this is the exception"; }; if ($@) { print "Caught exception: >$@<\n"; } else { print "No exception\n"; } You can see that the $@ variable is empty. It happens if the get_logger =20 subroutine is called from the DESTROY method when an objects is going out= =20 of scope. No DESTROY or no get_logger and the program works fine. I am =20 very curious what is wrong here. Please reply to my private mailbox too as I do not subscribe to this list= . -- Maciej Walezak |
From: Kevin G. <ke...@go...> - 2004-06-08 08:01:43
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nice work, Mike, as usual. Now to the question of alleged memory leak. Here is code and annoted output ============================================= use Log::Log4perl qw(get_logger); $Log::Log4perl::CHATTY_DESTROY_METHODS=1; Log::Log4perl->init(\ q{ log4perl.logger = DEBUG, A1 log4perl.appender.A1 = Log::Log4perl::Appender::Screen log4perl.appender.A1.layout = SimpleLayout }); $logger = get_logger(); warn "created logger $logger"; ============================================= created logger Log::Log4perl::Logger=HASH(0x8105018) at test line 13. --that's the one I created Destroying logger Log::Log4perl::Logger=HASH(0x811e474) at lib/Log/Log4perl/Logger.pm line 56. --there goes the root logger Destroying logger Log::Log4perl::Logger=HASH(0x8105018) at lib/Log/Log4perl/Logger.pm line 56. --there goes mine Destroying logger Log::Log4perl::Logger=HASH(0x811e474) at lib/Log/Log4perl/Logger.pm line 56. --there goes the root logger again Destroying appender Log::Log4perl::Appender=HASH(0x82526bc) at lib/Log/Log4perl/Appender.pm line 263. --there goes the appender --now we enter the GDP Destroying appender Log::Log4perl::Appender=HASH(0x82526bc) at lib/Log/Log4perl/Appender.pm line 263 during global destruction. --there goes the appender again Destroying logger Log::Log4perl::Logger=HASH(0x8105018) at lib/Log/Log4perl/Logger.pm line 56 during global destruction. --there goes the logger again Now I assume you're worried about those two cleanups during the GDP. Looking at the logger first, I tried dumping the structure in the DESTROY method and by the time it's in the last line of output the logger is totally empty, it's been cleaned out already. I think the reference it's cleaning up is the reference in *main:: in the script. I added "undef $logger" to the script to delete the reference from *main:: and that line disappeared from the output. So I don't think that's a problem. That leaves the Appender. Again I tried dumping the struct from DESTROY and it was totally empty. Means there's a reference to it floating around. If you look at Logger::generate_coderef(), you'll see that inside the coderef is a closure, $appenders is referenced inside the coderef but is defined outside it. That's our culprit. If you change the eval and return at the end of generate_coderef() to "return sub{}", then the "Appender during global destruction" line goes away from the output and that's it for the memory leak. So I'm pretty sure it's the closure that's the problem. With the "return sub{}" change in generate_coderef(), putting a while loop around the above code and running it forever doesn't use up any memory. Since the appender is empty by the time it gets to the GDP, I'm pretty sure that the cause of the memory leak isn't the appenders. I think it's the code eval. We're adding to the code each time through. But that's as far as I can get. Devel::Leak might help, if I built a Perl with debugging, but it's way, way past my bedtime. On the bright side, it's really not a problem unless somebody is running init() a thousand times in the life of the process, and we kind of discourage that anyway, don't we? - -- Happy Trails. . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510)525-5217 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQFAxXI34g4/Tl71vUkRAsxmAKDGSyPd2VO8msvs0kEEmQBz+S0uqQCg1dsK bzijFBfoGHni9jf22WDk6gk= =os8v -----END PGP SIGNATURE----- |
From: hampton <ho...@se...> - 2004-06-07 22:45:54
|
Уважаемые господа! Предлагаем Вам 15.06 поучаствовать в однодневном семинаре по теме : «Заработная плата: бухгалтерский и налоговый аспект» Семинар рекомендуется главным бухгалтерам, налоговым консультантам, руководителям пре6дприятия. Программа семинара. 1. Правовые основы оплаты труда: что нового? 2. Оплата за отработанное время - МРОТ - Заработная плата, тарификация работ - Доплаты и надбавки - Гарантии и компенсации 3. Оплата за неотработанное время: - Оплата отпусков, оплата льготных часов - Компенсации работникам, совмещающим учебу с работой - Оплата при выполнении государственных и общественных обязанностей 4. Другие выплаты работникам 5. Расчеты при увольнении работника 6. Удержания из заработной платы: - НДФЛ - Удержание в погашение задолженности работодателю - Удержание по исполнительным документам 7. Бухгалтерский и налоговый учет расчетов по оплате труда 8. Санкции за нарушение трудового и налогового законодательства в сфере оплаты труда 9. Сложные вопросы и типичные ошибки в расчетах по оплате труда Стоимость участия 3900 руб. с НДС. Стоимость приобретения видеозаписи семинара на видео или DVD + раздаточный материал 2600 руб с НДС. Контактный телефон 788-73-28 |
From: Mike S. <m...@pe...> - 2004-06-06 19:55:16
|
I've checked in the changes for the global cleanup. There's still one open issue, but it can be tackled another time: Added a cleanup() function to Logger.pm which is used by an END {} block in Logger.pm to tear down all Loggers/Appenders before global destruction kicks in. There's still a problem with a leftover reference to a L4p::Appender object, which you can see if you set $Log::Log4perl::CHATTY_DESTROY_METHODS to 1. The "meat" is cleaned up by the cleanup function, calling its DESTROY() method, though. However, there's still another call to DESTROY() during the GDP. Kevin's idea is in now, on localizing $? in the L4p global END {} block. It prevents logdie() et. al from exiting with unwanted exit codes when global cleanup / global destruction modifies $?, as seen by Tim with the Email appender. Here's the diff: Index: Changes =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/Changes,v retrieving revision 1.186 diff -a -u -r1.186 Changes --- Changes 28 May 2004 23:41:53 -0000 1.186 +++ Changes 6 Jun 2004 19:45:33 -0000 @@ -5,6 +5,18 @@ 0.46 (not yet released) * (ms) removed superfluous eval() in Log4perl.pm, reported anonymously on the CPAN bugtracker. + * (ms) Added a cleanup() function to Logger.pm which is used by an + END {} block in Logger.pm to tear down all Loggers/Appenders + before global destruction kicks in. There's still a problem with + a leftover reference to a L4p::Appender object, which you can + see if you set $Log::Log4perl::CHATTY_DESTROY_METHODS to 1. The + "meat" is cleaned up by the cleanup function, calling its DESTROY() + method, though. However, there's still another call to DESTROY() + during the GDP. + * (ms) Kevin's idea is in now, on localizing $? in the L4p global END {} + block. It prevents logdie() et. al from exiting with unwanted + exit codes when global cleanup / global destruction modifies $?, + as seen by Tim with the Email appender. 0.45 (05/23/2004) * (ms) fix for t/045Composite.t on perl 5.6.1 by Jeff Macdonald Index: lib/Log/Log4perl.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl.pm,v retrieving revision 1.164 diff -a -u -r1.164 Log4perl.pm --- lib/Log/Log4perl.pm 28 May 2004 23:41:54 -0000 1.164 +++ lib/Log/Log4perl.pm 6 Jun 2004 19:45:36 -0000 @@ -2,6 +2,9 @@ package Log::Log4perl; ################################################## + # Have this first to execute last +END { local($?); Log::Log4perl::Logger::cleanup(); } + use 5.006; use strict; use warnings; @@ -57,6 +60,8 @@ #and XML Config unit tests our $DOM_VERSION_REQUIRED = '1.29'; +our $CHATTY_DESTROY_METHODS = 0; + ################################################## sub import { ################################################## Index: lib/Log/Log4perl/Appender.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Appender.pm,v retrieving revision 1.35 diff -a -u -r1.35 Appender.pm --- lib/Log/Log4perl/Appender.pm 26 Apr 2004 02:41:10 -0000 1.35 +++ lib/Log/Log4perl/Appender.pm 6 Jun 2004 19:45:37 -0000 @@ -260,7 +260,11 @@ ################################################## sub DESTROY { ################################################## - # just there because of AUTOLOAD + warn "Destroying appender $_[0]" if $Log::Log4perl::CHATTY_DESTROY_METHODS; + + foreach my $key (keys %{$_[0]}) { + delete $_[0]->{$key}; + } } 1; Index: lib/Log/Log4perl/Logger.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Logger.pm,v retrieving revision 1.60 diff -a -u -r1.60 Logger.pm --- lib/Log/Log4perl/Logger.pm 9 Oct 2003 17:07:11 -0000 1.60 +++ lib/Log/Log4perl/Logger.pm 6 Jun 2004 19:45:38 -0000 @@ -23,6 +23,44 @@ __PACKAGE__->reset(); ################################################## +sub cleanup { +################################################## + # warn "Logger cleanup"; + + # Delete all loggers + foreach my $loggername (keys %$LOGGERS_BY_NAME){ + # warn "Logger delete: $loggername"; + $LOGGERS_BY_NAME->{$loggername}->DESTROY(); + delete $LOGGERS_BY_NAME->{$loggername}; + } + + # Delete the root logger + undef $ROOT_LOGGER; + + # Delete all appenders + foreach my $appendername (keys %APPENDER_BY_NAME){ + if (exists $APPENDER_BY_NAME{$appendername} && + exists $APPENDER_BY_NAME{$appendername}->{appender}) { + # Destroy L4p::Appender + $APPENDER_BY_NAME{$appendername}->DESTROY(); + delete $APPENDER_BY_NAME{$appendername}->{appender}; + } + delete $APPENDER_BY_NAME{$appendername}; + } + %APPENDER_BY_NAME = (); +} + +################################################## +sub DESTROY { +################################################## + warn "Destroying logger $_[0]" if $Log::Log4perl::CHATTY_DESTROY_METHODS; + + for(keys %{$_[0]}) { + delete $_[0]->{$_}; + } +} + +################################################## sub reset { ################################################## $ROOT_LOGGER = __PACKAGE__->_new("", $DEBUG); -- -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2004-06-05 17:19:17
|
Kevin Goess wrote on 6/1/2004, 10:55 AM: > The test script runs as expected if you change the END block to > > END{local($?); cleanup()} > > In that case, Tim's script also runs as expected, without the addition > of an additional END block. Sorry for the long wait, Kevin, you are 100% correct, what was I thinking! I've added your local() fix to the patch and the dietest.pl script as in use Log::Log4perl qw(get_logger :levels); Log::Log4perl->init(\q{ log4perl.logger = DEBUG, Mailer log4perl.appender.Mailer = Log::Dispatch::Email::MailSend log4perl.appender.Mailer.to = mschilli@localhost log4perl.appender.Mailer.subject = mysubject log4perl.appender.Mailer.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Mailer.layout.ConversionPattern = %m%n }); my $logger = get_logger("foo"); $logger->logdie( "boo" ); now works fine with an exit value of 255. Yay! :) Regarding the mem leak, the 'warn' statements in the patch now show that when running dietest.pl above, one appender is still left over for destruction in the GDP (although it doesn't matter anymore for $?, because its 'meat' is already gone at this point) -- do you have any ideas on how we can track down where it's still referenced from? -- -- Mike Mike Schilli m...@pe... Index: lib/Log/Log4perl.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl.pm,v retrieving revision 1.164 diff -a -u -r1.164 Log4perl.pm --- lib/Log/Log4perl.pm 28 May 2004 23:41:54 -0000 1.164 +++ lib/Log/Log4perl.pm 5 Jun 2004 17:10:02 -0000 @@ -2,6 +2,9 @@ package Log::Log4perl; ################################################## + # Have this first to execute last +END { local($?); Log::Log4perl::Logger::cleanup(); } + use 5.006; use strict; use warnings; Index: lib/Log/Log4perl/Appender.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Appender.pm,v retrieving revision 1.35 diff -a -u -r1.35 Appender.pm --- lib/Log/Log4perl/Appender.pm 26 Apr 2004 02:41:10 -0000 1.35 +++ lib/Log/Log4perl/Appender.pm 5 Jun 2004 17:10:03 -0000 @@ -260,7 +260,15 @@ ################################################## sub DESTROY { ################################################## - # just there because of AUTOLOAD + # use Data::Dumper; + + warn "Destroying appender $_[0]"; + # warn "app=", Dumper($_[0]), "-"; + + foreach my $key (keys %{$_[0]}) { + # print "deleting $key\n"; + delete $_[0]->{$key}; + } } 1; Index: lib/Log/Log4perl/Logger.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Logger.pm,v retrieving revision 1.60 diff -a -u -r1.60 Logger.pm --- lib/Log/Log4perl/Logger.pm 9 Oct 2003 17:07:11 -0000 1.60 +++ lib/Log/Log4perl/Logger.pm 5 Jun 2004 17:10:04 -0000 @@ -23,6 +23,45 @@ __PACKAGE__->reset(); ################################################## +sub cleanup { +################################################## + # warn "Logger cleanup"; + + # Delete all loggers + foreach my $loggername (keys %$LOGGERS_BY_NAME){ + # warn "Logger delete: $loggername"; + $LOGGERS_BY_NAME->{$loggername}->DESTROY(); + delete $LOGGERS_BY_NAME->{$loggername}; + } + + # Delete the root logger + undef $ROOT_LOGGER; + $LOGGERS_BY_NAME = (); + + # Delete all appenders + foreach my $appendername (keys %APPENDER_BY_NAME){ + if (exists $APPENDER_BY_NAME{$appendername} && + exists $APPENDER_BY_NAME{$appendername}->{appender}) { + # Destroy L4p::Appender + $APPENDER_BY_NAME{$appendername}->DESTROY(); + delete $APPENDER_BY_NAME{$appendername}->{appender}; + delete $APPENDER_BY_NAME{$appendername}; + } + } + %APPENDER_BY_NAME = (); +} + +################################################## +sub DESTROY { +################################################## + warn "Destroying logger $_[0]"; + + for(keys %{$_[0]}) { + delete $_[0]->{$_}; + } +} + +################################################## sub reset { ################################################## $ROOT_LOGGER = __PACKAGE__->_new("", $DEBUG); |
From: Mike S. <m...@pe...> - 2004-06-05 16:44:18
|
Kevin Goess wrote on 5/29/2004, 11:20 PM: > With my proposed changes, the emails would go to > "myw...@in..." instead of our developer. Good point. > Do you know how far log4j goes with the variable substitution stuff? They don't support 'code' on the right-hand side of the assignment, so there's no conflict between the code's variables and log4j's ${var} placeholders. -- -- Mike Mike Schilli m...@pe... |