Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Getting "close() on unopened filehandle FH" from Log::Log4perl

by glasswalk3r (Friar)
on Jul 31, 2013 at 15:23 UTC ( #1047283=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    log4perl.logger.Siebel.Srvrmgr.Daemon=DEBUG, A1
    log4perl.appender.A1=Log::Log4perl::Appender::File
    ...
    log4perl.appender.A2.layout=Log::Log4perl::Layout::PatternLayout
    log4perl.appender.A2.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%
    +n
    log4perl.logger.Siebel.Srvrmgr.ListParser=WARN, A2
    
  2. or download this
    sub gimme_logger {
    
    ...
    
        return Log::Log4perl->get_logger('Siebel::Srvrmgr::Daemon');
    }
    
  3. or download this
    sub run {
    
    ...
        weaken($logger);
    
        # rest of code goes here
    
  4. or download this
    sub DEMOLISH {
    
    ...
        my $logger = __PACKAGE__->gimme_logger();
        weaken($logger);
        # rest of code goes here
    
  5. or download this
    sub logging_cfg {
    
    ...
        return $cfg;
    
    }
    
  6. or download this
    C:\Temp\memcached>server2.pl
    Starting Nagios::Cache::Server...done
    ...
    Ready to accept requests
    close() on unopened filehandle FH at C:/strawberry/perl/site/lib/Log/L
    +og4perl/Appender/File.pm line 257 during global destruction.
    Can't close C:/Temp/perl/project.log (Bad file descriptor) at C:/straw
    +berry/perl/site/lib/Log/Log4perl/Appender/File.pm line 282 during glo
    +bal destruction.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1047283]
Approved by marto
Front-paged by sparkyichi
help
Chatterbox?
[GotToBTru]: un less you're working on write-only memory
[1nickt]: my $x = $aohoaoh->[0]->{' foo'}->[0]->{'bar' }; should work
[thepkd]: not indexing
[thepkd]: getting data out of the ds
[choroba]: it depends. Give more details, please
[thepkd]: i used a series of {}'s but it dont work
[choroba]: You need square brackets for arrays
[GotToBTru]: you can certainly construct a single expression to access any part of the data structure, without using temp variables. but you might make it easier on yourself and any other poor soul who has to understand your code if you do
[thepkd]: to dereference i mean
LanX .oO( oh tempz, oh moretz)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2016-12-06 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (104 votes). Check out past polls.