|
From: Richard H. <ric...@gm...> - 2005-03-24 18:13:40
|
On Thu, 24 Mar 2005 09:01:27 +0100, Kutter Martin
<mar...@si...> wrote:
> Hi Richard,
>=20
> I have seen this warning several times before. It appears when a
> Log::Log4perl::get_logger() call is issued before Log::Log4perl::init (or
> init_once) is called.
>=20
> Normally you'll have the "init" call right at the beginning of your perl
> programs, but if you "use" modules, the loading and initialization of the=
se
> happens in a BEGIN block (well, somewhat), which means that a module like
> this will kick up a warning.
>=20
> package bla;
>=20
> use Log::Log4perl;
> my $log =3D Log::Log4perl->get_logger();
> 1;
>=20
>=20
>=20
> To avoid this, use a BEGIN block like the following in your top-level per=
l
> program (startup.pl in OI2).
>=20
> BEGIN {
> =09use Log::Log4perl;
> =09Log::Log4perl->init('log4perl.conf');
> };
>=20
> This forces Log4perl initialization to be performed before all other modu=
le
> loads and initializations and should remove the warning.
Ok, great, thanks.
RIchard
>=20
> Regards,
>=20
> Martin Kutter
>=20
> -----Urspr=FCngliche Nachricht-----
> Von: ope...@li...
> [mailto:ope...@li...]Im Auftrag von
> Richard Hubbell
> Gesendet: Mittwoch, 23. M=E4rz 2005 22:37
> An: ope...@li...
> Betreff: [Openinteract-help] seems to be a minor error....
>=20
>=20
> Hi all,
>=20
> I also have what appears to be a minor problem that I only now notice.
>=20
> apache/bin/apachectl configtest
>=20
> Log4perl: Seems like no initialization happened. Forgot to call init()?
> Syntax OK
>=20
> I think that SPOPS uses Log4perl so I am guessing that's where something
> needs
> a little TLC. Anyone else seeing this?
>=20
>=20
> Richard
> --
>=20
>=20
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content.
> Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=3D6883&alloc_id=3D15149&op=
=3Dclick
> _______________________________________________
> openinteract-help mailing list
> ope...@li...
> https://lists.sourceforge.net/lists/listinfo/openinteract-help
>=20
--
|