0

I'm trying to set up stackdriver logging according to the documentation: https://cloud.google.com/logging/docs/setup/nodejs, in particular using the bunyan plugin.

I am trying to consolidate my logs from my cronjobs (deployed using GKE), and can see the logs when I click in from the GKE console into the pod container logs.

However, I am unable to find them in Stackdriver console when I search for either text: [logger-name], or even from selecting Kubernetes Cluster resource. I was able, however, to do it from my local machine and even tried uploading a service key when instantiating my Logger instance below, but to no avail.

    const bunyan = require("bunyan");
    // Imports the Google Cloud Client Library for Bunyan
    const {LoggingBunyan} = require("@google-cloud/logging-bunyan");

    // Creates a Bunyan Stackdriver Logging client
    const loggingBunyan = new LoggingBunyan({
        keyFilename: './keys/cron-job-logging.json'
    });

Would like to seek advice on what I missed out?

c69
  • 19,951
  • 7
  • 52
  • 82
jlyh
  • 681
  • 9
  • 32
  • There are four different logs for GKE within the Stackdriver Logging Console: GKE Cluster Operations, GKE Container, GKE Node Pool Operations, Kubernetes Engine. I would suggest checking each Logging page within the Console as you could be looking for the logs under the wrong Logging resource. – Jason Sep 25 '18 at 20:41
  • If you still cannot see the logs under the other GKE resources within Stackdriver Logging, provide your code. – Jason Sep 25 '18 at 20:49

0 Answers0