File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44namespace Innmind \OperatingSystem \Config ;
55
66use Innmind \OperatingSystem \Config ;
7+ use Innmind \Server \Control ;
78use Innmind \HttpTransport ;
89use Innmind \TimeWarp \Halt ;
910use Formal \AccessLayer \Connection ;
@@ -30,6 +31,10 @@ public function __invoke(Config $config): Config
3031 ->mapSQLConnection (fn ($ connection ) => Connection \Logger::psr (
3132 $ connection ,
3233 $ this ->logger ,
34+ ))
35+ ->mapServerControl (fn ($ server ) => Control \Servers \Logger::psr (
36+ $ server ,
37+ $ this ->logger ,
3338 ));
3439 }
3540
Original file line number Diff line number Diff line change @@ -76,10 +76,7 @@ public function status(): Status\Server
7676 #[\Override]
7777 public function control (): Control \Server
7878 {
79- return Control \Servers \Logger::psr (
80- $ this ->os ->control (),
81- $ this ->logger ,
82- );
79+ return $ this ->os ->control ();
8380 }
8481
8582 #[\Override]
@@ -97,10 +94,7 @@ public function sockets(): Sockets
9794 #[\Override]
9895 public function remote (): Remote
9996 {
100- return Remote \Logger::psr (
101- $ this ->os ->remote (),
102- $ this ->logger ,
103- );
97+ return $ this ->os ->remote ();
10498 }
10599
106100 #[\Override]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -71,6 +71,22 @@ public function testSsh()
7171 ->unwrap ();
7272 }
7373
74+ public function testSshLogger ()
75+ {
76+ $ remote = Generic::of (
77+ $ this ->server ("ssh '-p' '42' 'user@my-vps' 'ls' " ),
78+ Config::of ()->map (Config \Logger::psr (new NullLogger )),
79+ );
80+
81+ $ remoteServer = $ remote ->ssh (Url::of ('ssh://user@my-vps:42/ ' ));
82+
83+ $ this ->assertInstanceOf (Servers \Logger::class, $ remoteServer );
84+ $ remoteServer
85+ ->processes ()
86+ ->execute (Command::foreground ('ls ' ))
87+ ->unwrap ();
88+ }
89+
7490 public function testSshWithoutPort ()
7591 {
7692 $ remote = Generic::of (
You can’t perform that action at this time.
0 commit comments