From the course: LLMOps in Practice: A Deep Dive

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Hands-on logging

Hands-on logging

So to this point, we've now created the fully RAGable version of our application, our chatbot. We were able to take a Chroma DB, take a book, slice it up, store it in the Chroma DB, and then change our chatbot to be able to search that for context that would add to our chat message so that we were getting great information back. So now, as we move on in the app's journey, we've been looking at logging metrics and version management. Previously, we looked at logging and I want to now start getting hands-on and showing you the code for logging. This is going to be using Winston, and we're going to start by taking a look at the logger.js file that we spoke about in the slides and how to implement that in Winston. So if you're working from the start directory which we provided in the GitHub, your logger.js is going to look like this. So I've done some of the environment for you, for example, showing what to do if it's in production, creating the stream object, and outputting it. But…

Contents