Re: Wx

philippe_44 <philippe_44.atrljz-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]> Sat, 12 Nov 2022 06:52:56 +0000
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
--===============8302895691325537605==
Content-Type: text/plain


mherger wrote: 
> > IĆ¢&#8364;&#8482;m just trying to have my log file displayed in a more
> user friendly
> > way, basically reusing how server.log is displayed which looked to me
> as
> > just being done using that call to Wx
> 
> The web based log viewers are page handlers like any other page handler.
> 
> You might be able to re-use that code. Please see
> 
> https://github.com/Logitech/slimserver/blob/public/8.4/Slim/Web/HTTP.pm#L1331

Well, I gave the disclaimer it was a silly question :-)

More seriously, if I try to leverage the Slim::Web::HTTP::logFile, there
is an issue because it assumes there is a method by the name of the
build-in log files

Code:
--------------------
    
  	$logfile =~ s/log/server/;
  	$logfile .= 'LogFile';
  	
  	my $logFile = Slim::Utils::Log->$logfile;
  
--------------------

Now, I can add a method to the class that works for me, but I assume
that will make everybody cringe 

Code:
--------------------
    
  	*Slim::Utils::Log::upnpbridgeLogFile = sub { Plugins::UPnPBridge::Squeeze2upnp->logFile; };
  
--------------------

Is there another solution or shall I just copy the code (which I would
have to do in every plugin :()



LMS 8.2 on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet, 1xTouch,
1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW,
2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,  Yamaha
WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3
------------------------------------------------------------------------
philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=117051


--===============8302895691325537605==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
developers mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/developers

--===============8302895691325537605==--