in reply to Re: Net::Appliance::Session is sending too much output to the screen
in thread Net::Appliance::Session is sending too much output to the screen

Okay, so I attempted to navigate Net::CLI::Interact::Logger, and tried a few things, but no luck. I think I'm doing this right, but it doesn't seem to make any difference, and I'm still getting the same output.

I slipped this snippet in immediately after my session declaration.

$s->nci->logger->log_config({ dispatchers => ['screen'], screen => { class => 'Log::Dispatch::Screen', min_level => 'error' } });

I also attempted another route, thinking I was attacking it at a deeper level, but it didn't do any good either

use Log::Dispatch::Screen; my $log = Log::Dispatch->new(); $log->add( Log::Dispatch::Screen->new( name => 'screen', min_level => 'error' ) );

Replies are listed 'Best First'.
Re^3: Net::Appliance::Session is sending too much output to the screen
by Discipulus (Canon) on Mar 03, 2016 at 21:44 UTC
    okay i for sure not the best help for you.. i cannot reproduce your code nor your errors.. i just told you what i saw in the docs.

    Anyway the output you posted seems to me a dump of the Net::CLI::Interact::ActionSet that are Moo::Object stuffs. It is this the only unwanted output you get? the rest of the output is what do you expect? if you leverage the logger the otput change somehow?

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.