Visual Flow Logger (VFL) is a Structured Logging Framework designed to capture and visualize how your applications actually execute. Unlike traditional flat logging that gives you disconnected log entries, VFL creates a hierarchical representation of your program's flow that shows the relationships between different operations and how they unfold over time.
VFL supports distributed tracing, meaning the structured flow can seamlessly span multiple services and systems, giving you a complete picture of complex workflows across your entire architecture.
First, you'll need to host VFLHub - the central server that stores and visualizes your logs.
VFLHub provides:
- Log storage and processing
- Web-based visualization interface
- API endpoints for log ingestion
Add the VFL Java Client framework to your project to start structured logging.
Java VFL Client Documentation β
The client framework handles:
- Hierarchical log creation
- Automatic context management
- Transmission to VFLHub
- Cross-service trace correlation
Traditional logging gives you this:
[INFO] Processing user order
[INFO] Validating payment method
[INFO] Checking inventory
[INFO] Payment processed
[INFO] Inventory updated
[INFO] Order completed
VFL gives you this structured view:
π Process User Order
βββ π Starting order processing
βββ π Payment Processing (parallel)
β βββ π Validating payment method
β βββ π Contacting payment gateway
β βββ π Payment authorized
βββ π Inventory Check (parallel)
β βββ π Checking product availability
β βββ π Stock confirmed
βββ π Creating order record
βββ π Order #12345 completed
VFL structures your logs in a tree-like hierarchy, making it easy to understand the relationship between different parts of your program execution.
VFL can represent the full spectrum of modern application execution patterns:
- Sequential Flow - Step-by-step operations that happen one after another
- Parallel Operations - Multiple operations running simultaneously
- Fire-and-Forget - Background tasks that don't need to report back
- Rejoining Parallel - Parallel operations that eventually merge back into the main flow
- Event-Driven - Publisher/subscriber patterns and event-driven architectures
- Cross-Service Flows - Operations that span multiple microservices or distributed systems
VFL's structured approach naturally extends across service boundaries. When Service A calls Service B, VFL maintains the hierarchical structure, showing you:
- How requests flow between services
- Timing relationships across your architecture
- The complete end-to-end journey of complex operations
- Dependencies and interactions in distributed systems
In Visual Flow Logger, everything is represented as Blocks and Logs.
Blocks are containers that represent a scope of execution. Each block contains:
- Unique identifier for linking and referencing
- Human-readable name describing its purpose
- Timestamps showing when it started and ended
- Hierarchical relationships to parent and child blocks
Blocks represent whatever scope makes sense for your application - you decide what constitutes a meaningful boundary.
Logs are the individual events that happen within blocks:
- Method entry and exit points
- Decision points and conditions
- Data transformations
- External service calls
- Error conditions
- Any other significant events
Logs are chronologically ordered within their block and linked to their containing block for context.
The power of VFL comes from how blocks and logs work together:
- Blocks contain logs showing step-by-step execution
- Logs can reference other blocks, creating hierarchical relationships
- Child blocks represent sub-operations or deeper detail levels
- Parent blocks provide context for understanding the bigger picture
This creates a natural tree structure that mirrors how applications actually execute - from high-level business operations down to detailed implementation steps.
User Registration Block
βββ Log: "Starting user validation"
βββ Email Validation Block
β βββ Log: "Checking email format"
β βββ Log: "Email format is valid"
β βββ Log: "Checking if email already exists"
β βββ Log: "Email is available"
βββ Password Processing Block
β βββ Log: "Validating password strength"
β βββ Log: "Password meets requirements"
β βββ Log: "Generating password hash"
β βββ Log: "Password hashed successfully"
βββ Database Operations Block
β βββ Log: "Creating user record"
β βββ Log: "Saving to users table"
β βββ Log: "User created with ID: 12345"
βββ Log: "Registration completed successfully"
E-commerce Order Processing Block
βββ Log: "Processing order #ORD-789"
βββ Log: "Starting parallel validations"
βββ Payment Authorization Block (β±οΈ 1.2s)
β βββ Log: "Validating credit card details"
β βββ Log: "Contacting payment gateway"
β βββ Log: "Payment authorized: $149.99"
β βββ Log: "Transaction ID: TXN-ABC123"
βββ Inventory Check Block (β±οΈ 0.8s)
β βββ Log: "Checking product availability"
β βββ Log: "Product SKU-001: 15 units available"
β βββ Log: "Product SKU-002: 8 units available"
β βββ Log: "All items in stock - reserving inventory"
βββ Log: "Both validations completed - proceeding"
βββ Order Creation Block
β βββ Log: "Generating order confirmation"
β βββ Log: "Updating inventory levels"
β βββ Log: "Order record saved"
βββ Log: "Order processing completed"
User Profile Update Block
βββ Log: "Updating profile for user: john_doe"
βββ Profile Validation Block
β βββ Log: "Validating profile fields"
β βββ Warning: "Profile image size is large 2.5MB"
β βββ Log: "Validation passed"
βββ Database Update Block
β βββ Log: "Updating user_profiles table"
β βββ Log: "Profile updated successfully"
βββ Cache Invalidation Block (π₯ Fire-and-Forget)
β βββ Log: "Invalidating user cache"
β βββ Log: "Cache cleared for user: john_doe"
βββ Analytics Tracking Block (π₯ Fire-and-Forget)
β βββ Log: "Recording profile update event"
β βββ Log: "Event sent to analytics service"
βββ Email Notification Block (π₯ Fire-and-Forget)
β βββ Log: "Preparing profile update email"
β βββ Log: "Sending notification email"
β βββ Log: "Email queued successfully"
βββ Log: "Profile update completed - background tasks initiated"
API Gateway: User Authentication Block
βββ Log: "Received login request for: [email protected]"
βββ Log: "Routing to authentication service"
βββ Auth Service: Validate Credentials Block (π Cross-Service)
β βββ Log: "Processing authentication request"
β βββ Log: "Looking up user in database"
β βββ Password Verification Block
β β βββ Log: "Retrieving stored password hash"
β β βββ Log: "Comparing provided password"
β β βββ Log: "Password verification successful"
β βββ Log: "Calling token service for JWT generation"
β βββ Token Service: Generate JWT Block (π Cross-Service)
β β βββ Log: "Generating JWT token for user: 12345"
β β βββ Log: "Setting token expiration: 24 hours"
β β βββ Log: "Signing token with private key"
β β βββ Log: "Token generated successfully"
β βββ Log: "Received JWT token from token service"
β βββ Log: "Recording login event in audit log"
β βββ Log: "Authentication completed successfully"
βββ Log: "Received successful auth response"
βββ Log: "Adding security headers"
βββ Log: "Returning JWT to client"
βββ Log: "Authentication flow completed - total time: 245ms"
VFL transforms logging from a debugging afterthought into a powerful tool for:
- Understanding complex systems through clear visual structure
- Debugging distributed applications with end-to-end trace visibility
- Performance analysis with timing relationships preserved
- System monitoring with meaningful operational context
- Team collaboration through shared understanding of application flow
Whether you're building a simple application or managing a complex distributed system, VFL provides the structured visibility you need to understand, debug, and optimize your software.