Giter Club home page Giter Club logo

Comments (12)

ofrobots avatar ofrobots commented on August 30, 2024 3

@dieguezz working on a release in #131. Hopefully it can be shipped soon.

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024 1

@dieguezz those are all logs parsed from stdout. The stream sent by loggingBunyan.stream() are supposed to show up under a different category in the UI.

I am trying out LoggingBunyan on my own GKE app, and I can reproduce the actual issue that the logs don't seem to be available anywhere in the Logging UI.

I'm investigating this – stay tuned.

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024 1

The fix has been released in v0.9.1: https://www.npmjs.com/package/@google-cloud/logging-bunyan?activeTab=versions. @dieguezz please give it a shot and let us know if this works better.

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024

Hi @dieguezz. I see that you have a stdout stream in addition to the LoggingBunyan stream. For code running on some Google Cloud environments such as GAE and GKE, the stdout is captured by default and sent to Stackdriver Logging (albeit in an unstructured way – since stdout is unstructured) in addition to the stream that LoggingBunyan sends.

Are you looking at the stdout or the bunyan log in the Stackdriver Logging user interface?

from nodejs-logging-bunyan.

dieguezz avatar dieguezz commented on August 30, 2024

Hey @ofrobots, my code is running on GKE and i am looking at (screenshot) the Stackdriver Logging ui. I am doing different test but i don't find the combination.

I think that default behavior is as you say, they print everything from stdout as info and everyhting from stderr as error, but i want to differ warnings, debug, info, and well, all levels.

If i remove the stdout stream and leave the LoggingBunyan, i am not receiving anything in Stackdriver logging ui. Can you show me an example of how should i configure it?

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024

For an AppEngine (GAE) app, here's an example of where the log would shows up:

image

Let me see how this would show up in a GKE environment.

from nodejs-logging-bunyan.

dieguezz avatar dieguezz commented on August 30, 2024

You mean this?
captura de pantalla 2018-08-16 a las 21 02 02

Anyway, all of them appear as info unless i add severity like: logger.info({ severity: 'LEVEL', ... }), but that should be done automatically from level as stated in related issue
Then appears as should:

captura de pantalla 2018-08-16 a las 21 29 02

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024

@dieguezz Can you try selecting "All namespace_id" when navigating the logs?

image

Then you can further filter out the log to see only the bunyan logs:

image

Sorry that this is complicated and non-obvious. We will get this improved.

Notes for my fellow maintainers of this repo: The root cause is that this library is sending LogEntries without a namespace_id specified in the container monitored resource descriptor on GKE. The Logging UI expects this field to be non-empty. The problem is that the value of namespace_id is easily available inside a container – or at least, I don't know the mechanism to get the value. This needs to be investigated and fixed.

from nodejs-logging-bunyan.

dieguezz avatar dieguezz commented on August 30, 2024

You are right, i see them when i select all. Any ideas of why is this? i'd like to do it selecting just the branch i want (only one namespace)

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024

Implementing a fix over here: googleapis/nodejs-logging#191

from nodejs-logging-bunyan.

dieguezz avatar dieguezz commented on August 30, 2024

Thanks a lot @ofrobots, just one more thing. When are you going to deploy a new release?

from nodejs-logging-bunyan.

elucidsoft avatar elucidsoft commented on August 30, 2024

This fix needs to be applied to https://github.com/googleapis/nodejs-logging-winston as well as Winston is doing the same thing.

from nodejs-logging-bunyan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.