Best of LoggingJune 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    Structured logging for Next.js

    This post discusses implementing structured logging in Next.js to improve error tracking and user interaction insights. It introduces two solutions: next-logger for automatic JSON formatting of logs, easily integrated but limited to specific server environments; and pino, a highly customizable and high-performance logging library for Node.js, suitable for both development and production environments. The post provides steps for integrating pino with Next.js and highlights the benefits of JSON logging for both frontend and backend applications.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    sindresorhus/awesome-nodejs: :zap: Delightful Node.js packages and resources

    A curated list of Node.js packages and resources for developers.

  3. 3
    Article
    Avatar of itnextITNEXT·2y

    Kubernetes: monitoring Events with kubectl and Grafana Loki

    In Kubernetes, events provide critical information on the operational status of components like Pods, WorkerNodes, and the Scheduler. These events can be monitored using kubectl commands or integrated with tools like Grafana Loki for more advanced visualization and alerting. Various plugins and solutions, such as k8s-event-logger, can help collect and log these events, aiding in debugging and system performance monitoring.

  4. 4
    Article
    Avatar of baeldungBaeldung·2y

    HTTP Request and Response Logging Using Logbook in Spring

    Logbook is an extensible Java library that enables complete request and response logging for various technologies. By adding a Logbook Maven dependency and configuring logback-spring.xml and application.properties files, HTTP requests and responses can be logged in a Spring Boot application. The library supports filtering and formatting logs, and provides different sinks like the ChunkingSink and LogstashLogbackSink for advanced logging needs. Custom sink implementations and JSON formatting are also possible.

  5. 5
    Video
    Avatar of codeheimcodeHeim·2y

    #43 Golang - Web Development: Adding Middleware to HTTP Server

    Learn how to add middleware to a Golang HTTP server. Middleware allows code to run before or after the main handler logic, facilitating tasks like logging, authentication, and error handling. Walk through creating a simple server, adding middleware functions, and implementing logging middleware that applies to all APIs. Enhance your server's capabilities efficiently and cleanly.

  6. 6
    Article
    Avatar of codemazeCode Maze·2y

    How to Use FakeLogger to Test Logging Code in .NET

    This post emphasizes the importance of integrating logging into unit tests in .NET applications. It explains the use of FakeLogger to test logging code, providing a comparison with the classical approach using Mock.Verify. The post includes sample code for both methodologies, highlights the properties and setup of FakeLogger, and gives examples of how FakeLogger simplifies the task of validating log messages for different scenarios.