Best of Logging2024

  1. 1
    Video
    Avatar of communityCommunity Picks·2y

    12 Logging BEST Practices in 12 minutes

    Effective logging is crucial for troubleshooting and maintaining system health. Key practices include having a clear plan, understanding log levels (info, warning, error, fatal), using structured logging, capturing detailed log entries, implementing log sampling to reduce storage costs, using canonical log lines, centralizing logs, setting retention policies, securing sensitive data, and choosing efficient logging libraries to minimize performance impact. Additionally, metrics should be used alongside logs for real-time monitoring.

  2. 2
    Article
    Avatar of notedNoted·2y

    Dozzle - Self-Hosted Docker Container Log Monitoring

    Dozzle is a self-hosted tool for real-time monitoring and troubleshooting of Docker container logs. It allows you to view live log outputs, supports Docker Swarm for multiple node monitoring, and doesn't require a database or extra configuration. Features include fuzzy search, regex search, split-screen log viewing, memory and CPU usage stats, and multi-user authentication. It's lightweight, intuitive, and easily installed via Docker Compose.

  3. 3
    Article
    Avatar of rpythonReal Python·2y

    Logging in Python – Real Python

    Logging is a crucial practice for Python developers to record relevant information during code execution. Python's standard library includes a powerful logging module that helps in debugging, analyzing performance, and understanding application flow. This guide covers working with the logging module, setting up basic logging configurations, utilizing log levels, formatting log messages, directing log records through handlers, and defining logging rules with filters.

  4. 4
    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.

  5. 5
    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.

  6. 6
    Article
    Avatar of programmingdigestProgramming Digest·2y

    4 Software Design Principles I Learned the Hard Way

    Learn software design principles, improve code reusability in React components, and understand the essential log levels for logging.

  7. 7
    Article
    Avatar of communityCommunity Picks·2y

    5 Tips for Structured Logging in Spring Boot 3.4

    Spring Boot 3.4 introduces native support for structured logging using formats like Elastic Common Schema (ECS) and Logstash. This reduces dependency management and enhances observability in applications by capturing logs in a structured manner. The post emphasizes the importance of logs in understanding application behavior, particularly in distributed systems, and highlights best practices for logging. It also underscores the role of tools like OpenTelemetry and Digma in achieving comprehensive observability.

  8. 8
    Article
    Avatar of last9Last9·2y

    Golang Logging: A Comprehensive Guide for Developers

    Logging in Go is essential for debugging and maintaining application performance. While the standard log package offers basic functionality, third-party libraries like Zerolog and Zap provide advanced features like structured logging and configurable log levels. Implementing best practices, such as avoiding sensitive data in logs and using context-rich messages, can significantly enhance log analysis and troubleshooting. Integrating with observability platforms like ELK can further improve monitoring capabilities in production environments.

  9. 9
    Article
    Avatar of astro_sourceAstro·2y

    Astro 4.13

    Astro 4.13 has been released, providing stabilized experimental features like request rewriting and content collection JSON schemas. Improvements to logging are also included, making performance bottlenecks easier to detect. Users are guided on how to upgrade their existing projects using the new version.

  10. 10
    Article
    Avatar of last9Last9·2y

    Python Logging Best Practices: The Ultimate Guide

    Logging is a crucial aspect of Python development for tracking application behavior and troubleshooting. This guide delves into setting up logging, avoiding common pitfalls, and using advanced techniques to better handle logs in various project sizes. It emphasizes the importance of good logging practices to grasp application flow, debug effectively, get notifications of potential issues, and gain insights into user behavior and application performance. Key strategies include using the logging module efficiently, configuring loggers, handlers, formatters, and incorporating best practices for performance and security.

  11. 11
    Article
    Avatar of lobstersLobsters·1y

    I Almost Died for a Full Sentry Database

    A developer faced severe issues with a self-hosted Sentry instance that filled up rapidly, causing production apps to freeze due to blocking calls. Attempts to move Sentry to the cloud led to high costs and ultimately project failure due to mismanagement of error tracking and lack of proper alert monitoring.

  12. 12
    Article
    Avatar of planetpythonPlanet Python·2y

    An Intro to Logging with Python and Loguru

    Learn how to use Loguru to simplify logging in Python. Install Loguru with pip, change the handler and add formatting to logs, and catch exceptions with Loguru.

  13. 13
    Article
    Avatar of last9Last9·1y

    systemctl logs: A Guide to Managing Logs in Linux

    Logs are essential for understanding and troubleshooting Linux systems. systemctl, a key tool for managing systemd services, interacts with journald to provide detailed logs. This guide covers how to view, filter, and manage these logs using common journalctl commands, as well as best practices for log rotation, cleanup, and monitoring. Understanding and using systemctl logs helps maintain system health, resolve service failures, and optimize performance.

  14. 14
    Video
    Avatar of mattpocockMatt Pocock·2y

    Going weirdly deep on console.log

    Discover ways to enhance console logging in Node.js. Learn how to use util.inspect for detailed object inspection, including setting the depth and adding colors. Understand how console.dir can achieve similar results without importing util.

  15. 15
    Article
    Avatar of communityCommunity Picks·2y

    Django Logging | Tutorial & Best Practices

    Learn how to implement logging in Django and follow best practices to improve application development and end-user experience. Understand logging levels in Python.

  16. 16
    Article
    Avatar of mwaseemzakirWaseem .NET Newsletter·2y

    EP 60 : Logging with Serilog in .NET

    Logging is a fundamental aspect of development that helps identify and solve problems quickly. Serilog is a famous logging library in .NET that excels in structured logging.

  17. 17
    Article
    Avatar of nuxt_sourceNuxt·2y

    Nuxt 3.11 · Nuxt Blog

    Nuxt 3.11 has been released with better logging, preview mode, server pages, cache-busting payloads, middleware route rules, a new clear data fetching utility, support for teleports, loading indicator and transition controls, server- and client-only pages, server component improvements, performance improvements, public assets handling, chunk naming changes, type fixes, and more.

  18. 18
    Article
    Avatar of trevorlasnTrevor Lasn·1y

    AsyncLocalStorage: Simplify Context Management in Node.js

    AsyncLocalStorage allows you to maintain context across async operations without manually passing data through functions. It's useful for tracking requests in microservices, logging, and managing database transactions. However, it's unnecessary for simple synchronous code and can add complexity when building public APIs. AsyncLocalStorage requires Node.js 23 or higher.

  19. 19
    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.

  20. 20
    Article
    Avatar of last9Last9·2y

    Django Logging: Everything You Need to Know

    Logging is a crucial part of any web framework, including Django. This guide covers setting up and configuring Django logging, handling different log formats like JSON, and improving logging strategies for better monitoring and performance. It also discusses how to customize logging settings in settings.py, use various log levels, and employ advanced configurations using dictConfig. Additionally, it explains logging API calls, capturing server logs, and integrating with modern log analysis tools for enhanced observability.

  21. 21
    Article
    Avatar of last9Last9·1y

    Python Logging with Structlog: A Comprehensive Guide

    Enhance your Python logging with structlog, a library that creates structured, readable, and machine-friendly logs. structlog helps in preserving context, improving readability and analysis, and providing customizable pipelines for log processing. It integrates easily with existing frameworks like Python's built-in logging module and supports high-throughput systems with features like asynchronous and buffered logging. structlog also works well with microservices architectures and observability tools, ensuring your logs are actionable and insightful.

  22. 22
    Video
    Avatar of kantancodingKantan Coding·2y

    Linus's Laws of Writing Readable Code

    Choosing indents wisely can significantly impact code readability, with an optimal eight-character tab indentation. Long lines of code should be split carefully, avoiding breaks in user-visible strings or log messages. The complexity and indentation levels of a function determine its maximum permissible length, and clear code should negate the need for detailed comments explaining its function.

  23. 23
    Article
    Avatar of lnLaravel News·1y

    Adding Request Context in Laravel Applications

    Learn how to use Laravel's Context facade to enhance application insight by adding persistent metadata to your requests. This guide provides code examples on implementing context in middleware and API request logging, which enriches logs with valuable debugging information.

  24. 24
    Article
    Avatar of communityCommunity Picks·2y

    Uber’s Secret to Handle Millions of Logs per second with ClickHouse

    Uber overhauled its logging infrastructure by switching to ClickHouse, an open-source OLAP database, to handle millions of logs per second. The change addressed key issues they faced with ElasticSearch, such as developer productivity, performance, and scalability. ClickHouse offers high throughput ingestion, fast query performance, efficient storage, dynamic indexing, and clustering capabilities, making it a robust and scalable solution for Uber's massive logging needs.

  25. 25
    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.