[SOLVED] @capacitor/network getStatus() example returning undefined status

I am testing the example for Network.getStatus() but it’s returning undefined. What am I doing wrong? Using Ionic/Capacitor/Angular.

Also notice that the console.debug() inside the async() doesn’t even print.

import { Network } from '@capacitor/network';

@Injectable({
  providedIn: 'root',
})
export class WebsocketService{
  constructor() {
    const logCurrentNetworkStatus = async () => {
      try {
        const status = await Network.getStatus();

        // Never even see this
        let dbgMsg = 'websocket.service constructor() ';
        dbgMsg += 'Network.getStatus(): ';
        dbgMsg += JSON.stringify(status);
        console.debug(dbgMsg);
      } catch (e) {
        let dbgMsg = 'websocket.service constructor() Network.getStatus() ';
        dbgMsg += 'error: ' + JSON.stringify(e);
        console.debug(dbgMsg);
      }
    };

    let dbgMsg = 'websocket.service constructor() ';
    dbgMsg += 'logCurrentNetworkStatus: ';
    dbgMsg += JSON.stringify(logCurrentNetworkStatus);
    console.debug(dbgMsg);
  }
}

logcat:

2023-10-01 18:23:20.821 23497-23497 Capacitor/Console com.securecoop.app D File: http://localhost/main.js - Line 2729 - Msg: websocket.service constructor() logCurrentNetworkStatus: undefined

Found my problem. I assumed logCurrentNetworkStatus was a variable, but it should have been thought of as a function to call, if I am using the right words.

    let dbgMsg = 'websocket.service constructor() ';
    dbgMsg += 'logCurrentNetworkStatus(): ';
    dbgMsg += JSON.stringify(logCurrentNetworkStatus());
    console.debug(dbgMsg);

Output:

websocket.service constructor() logCurrentNetworkStatus(): {"__zone_symbol__state":null,"__zone_symbol__value":[]}
websocket.service constructor() Network.getStatus(): {"connected":false,"connectionType":"none"}