Best of LoggingNovember 2024

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

  3. 3
    Article
    Avatar of awegoAwesome Go·1y

    Contextual Logging in Go with Slog

    Contextual logging enhances logs by embedding additional data about events, making debugging and system maintenance more efficient. It involves adding context like the exact location in the code, server instance, and user details to logs. This guide explains implementing contextual logging in Go using the slog package and explores different methods like passing loggers through context, parameters, or using a global logger.

  4. 4
    Article
    Avatar of swizecswizec.com·2y

    Why you need observability more than tests

    Friday deploys can be daunting, but effective observability can quickly identify and resolve issues. Unlike tests, which can miss production-specific problems, observability provides real-time insights through centralized error logging and alerts. This approach facilitated a rapid response to a SQL error following an update, highlighting the importance of default instrumentation, easy log addition, and self-serve alert creation for maintaining system stability.

  5. 5
    Article
    Avatar of last9Last9·2y

    Understanding Docker Logs: A Quick Guide for Developers

    Docker logs are essential for monitoring and troubleshooting containers. This guide explains how to access, use, and customize Docker logs for better application management. Key commands and environment setup for logging, integrating with APIs, and advanced configuration options are covered. Best practices such as log rotation, structured logging, and centralized logging are also discussed.

  6. 6
    Video
    Avatar of lawrencesystemsLawrence Systems·2y

    Self Hosted Threat Hunting: Build Your Own Security Lab with Security Onion

    Security Onion is a free, open-source platform designed for threat hunting, security monitoring, and log management. It has been around since 2008 and offers interfaces for alerting, analyzing pcap files, detection engineering, and case management. This post explains the various installation modes such as import node, evaluation mode, and standalone mode, along with necessary hardware requirements and network configurations. It highlights how the tool can scale from home labs to enterprise environments.

  7. 7
    Article
    Avatar of last9Last9·1y

    Crontab Logs: Track, Debug, and Optimize Your Cron Jobs

    Cron jobs are essential for server automation tasks like database backups and temp file cleanup. Crontab logs are crucial for tracking and troubleshooting these jobs, ensuring they run smoothly by logging execution times, successes, and errors. Tips on enabling and optimizing these logs are discussed to help maintain efficient server operations.

  8. 8
    Article
    Avatar of last9Last9·2y

    Logging Errors in Go with ZeroLog: A Simple Guide

    ZeroLog is a high-performance, zero-allocation structured logging library for Go, ideal for applications where performance is critical. It supports adding contextual data, dynamic log modification using hooks, and integrates seamlessly with web frameworks like Echo and Gin. ZeroLog logs in JSON format by default but can be configured for human-readable output using ConsoleWriter. The library ensures minimal memory allocation, making it suitable for high log throughput systems. It also offers best practices for logging errors and customizing log formats.

  9. 9
    Article
    Avatar of last9Last9·2y

    Docker Logs Tail: A Developer's Guide

    Mastering Docker logs can significantly enhance your debugging efficiency for containerized applications. This guide covers the basics of Docker log commands, including the use of the tail command, advanced log management techniques, cross-platform considerations, and real-time monitoring. Essential tips include structured logging, log rotation, monitoring log volumes, and choosing appropriate logging drivers.