File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
src/Voryx/ThruwayBundle/Command Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,14 @@ protected function configure()
8181 */
8282 protected function execute (InputInterface $ input , OutputInterface $ output )
8383 {
84- Logger::set (new NullLogger ());
84+ if ($ this ->getContainer ()->getParameter ('voryx_thruway ' )['enable_logging ' ])
85+ {
86+ \Thruway \Logging \Logger::set ($ this ->logger );
87+ }
88+ else
89+ {
90+ \Thruway \Logging \Logger::set (new \Psr \Log \NullLogger ());
91+ }
8592
8693 $ this ->input = $ input ;
8794 $ this ->output = $ output ;
Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ protected function configure()
3939 */
4040 protected function execute (InputInterface $ input , OutputInterface $ output )
4141 {
42+ if ($ this ->getContainer ()->getParameter ('voryx_thruway ' )['enable_logging ' ])
43+ {
44+ \Thruway \Logging \Logger::set ($ this ->logger );
45+ }
46+ else
47+ {
48+ \Thruway \Logging \Logger::set (new \Psr \Log \NullLogger ());
49+ }
50+
4251 try {
4352 $ output ->writeln ('Making a go at starting the Thruway Router ' );
4453
Original file line number Diff line number Diff line change @@ -43,6 +43,14 @@ protected function configure()
4343 */
4444 protected function execute (InputInterface $ input , OutputInterface $ output )
4545 {
46+ if ($ this ->getContainer ()->getParameter ('voryx_thruway ' )['enable_logging ' ])
47+ {
48+ \Thruway \Logging \Logger::set ($ this ->logger );
49+ }
50+ else
51+ {
52+ \Thruway \Logging \Logger::set (new \Psr \Log \NullLogger ());
53+ }
4654
4755 try {
4856 echo "Making a go at starting a Thruway worker. \n" ;
You can’t perform that action at this time.
0 commit comments