LogStage - zero cost
structured logging
Maksym Ratoshniuk, 7mind.io
Yet another logger?
What is a structured
logging?
Common use cases:
● Tracing
● Liveness of your system
● Metrics
○ DB Calls
○ Http flow
○ Payment processing
○ Scheduling (jobs)
● Analytics
○ User behaviour
○ A/B Testing
Challenges
1. Broken SOLID and lot’s of
magic
Fluentd
?
Scala-logging
Finatra
2. Production unreadiness
● Asynchronous sinks
● File rotation
● Json rendering
● User context (like MDC)
● No performance hotspots
3. Jar Hell
3. Singletons and jar hell
We always write code...
… that is always structured
Logging always should be easy to read...
class ExampleService(log: IzLogger) {
val justAnArg = "example"
val justAList = List[Any](10, "green", "bottles")
log.trace(s"Argument: $justAnArg, another arg: $justAList")
log.info(s"Named expression: ${Random.nextInt() -> "random number"}")
log.warn(s"Invisible: ${Random.nextInt() -> "random number" -> null}")
val ctxLog = log("userId" -> "user@google.com", "company" -> "acme")
val delta = Random.nextInt(1000)
ctxLog.info(s"Processing time: $delta")
}
… and easier to deal with
class ExampleService(logger: IzLogger)
{
val justAnArg = "example"
val justAList = List[Any](
10, "green", "bottles"
)
logger.trace(
s"Argument: $justAnArg, another
arg: $justAList"
)
}
Logstage - zero-cost-tructured-logging
Features
Macro-based structuring and context
extraction
● Argument names, types, ordering
● Static information (file, line, class, function)
● Static part of our message - message template
(interpolation context)
Aliasing for references
Logstage - zero-cost-tructured-logging
Dynamic context & method
granularity
Logstage - zero-cost-tructured-logging
Reference configuration
SLF4J backend
A drop-in replacement for Logback, route your
legacy logs also
Out of box provisioning
- Console sink
- File sink
- Asynchronous sink (single worker thread at
the moment)
- String and Json rendering
Effectful adapters for ZIO, Cats, Monix
Automatic structure identifiers
Template as an identifier
If you have a structured
DB as a storage, you can
querying your logs with
the same structure
Let’s dive into coding
Almost no dependencies
Clean, neat, no singletons (except slf4j interop),
which may impact on working of systems with
isolated classloaders
Modular
Implement you own sink, router, policy, rotation
DI ready
Two separate settings
set.
Isn’t cool? 😍
DIStage out of box
Comparison with popular frameworks
Logstage Scribe Airframe Logback + SLF4j Scala Logging
Structured ✅ ❌ ❌ ❌ ❌
SOLID rules ✅ ❌ ❌ ❌ ❌
No singletons ✅ ❌ ❌ ❌ ❌
Modularity ✅ ❌ ❌ ❌ ❌
Asynchronous ✅ ✅ ✅ ✅ ✅
DI-readiness ✅ ❌ ❌ ❌ ❌
Colourful ✅ ❌ ✅ ✅ ❌
Dynamic Context ✅ ❌ ❌ ✅ ✅
File rotation ✅ ✅ ✅ ✅ ✅
Plans to work with
● Rethinking of rendering policy
● Better configuration
● Integrations with Logback, Azure,
ElasticSearch, Kafka
● Profiling and optimization performance
Welcome to contribution
Thank you for listening!
https://github.com/7mind
https://ratoshniuk.github.io/
https://github.com/ratoshniuk/scalaua-2019

More Related Content

PDF
Susunan atomdalambendapadat
PPTX
Is 12 Factor App Right About Logging
PDF
Developer Fundamentals - Logging
PDF
The burden of a successful feature: Scaling our real time logging platform
PDF
Logging and ranting / Vytis Valentinavičius (Lamoda)
PDF
Docker Logging and analysing with Elastic Stack - Jakub Hajek
PDF
Docker Logging and analysing with Elastic Stack
PDF
OSMC 2019 | Fast logs Ingestion by Nicolas Fraenkel
Susunan atomdalambendapadat
Is 12 Factor App Right About Logging
Developer Fundamentals - Logging
The burden of a successful feature: Scaling our real time logging platform
Logging and ranting / Vytis Valentinavičius (Lamoda)
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack
OSMC 2019 | Fast logs Ingestion by Nicolas Fraenkel

Similar to Logstage - zero-cost-tructured-logging (20)

PPTX
OSMC - Fast logs management
PDF
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
PPTX
Functional Application Logging : Code Examples Using Spring Boot and Logback
PPTX
Dissecting Open Source Cloud Evolution: An OpenStack Case Study
ODP
Log Management Systems
PPTX
ADDO Open Source Observability Tools
PDF
How to build observability into Serverless (O'Reilly Velocity 2018)
PDF
Logging in Scala
PDF
I Can See Clearly Now - Observing & understanding your Spring applications at...
PPTX
Rusty Waters: Elevating Lakehouses Beyond Spark
PDF
Redundant devops
PPTX
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
DOCX
Project Deimos
PPTX
Deep Visibility: Logging From Distributed Microservices
PDF
Elk stack @inbot
PDF
OSMC 2023 | Large-scale logging made easy by Alexandr Valialkin
PPTX
Your Guide to Streaming - The Engineer's Perspective
PDF
OSDC 2019 | Fast log management for your infrastructure by Nicolas Frankel
PDF
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
PDF
Why you should be using structured logs
OSMC - Fast logs management
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
Functional Application Logging : Code Examples Using Spring Boot and Logback
Dissecting Open Source Cloud Evolution: An OpenStack Case Study
Log Management Systems
ADDO Open Source Observability Tools
How to build observability into Serverless (O'Reilly Velocity 2018)
Logging in Scala
I Can See Clearly Now - Observing & understanding your Spring applications at...
Rusty Waters: Elevating Lakehouses Beyond Spark
Redundant devops
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Project Deimos
Deep Visibility: Logging From Distributed Microservices
Elk stack @inbot
OSMC 2023 | Large-scale logging made easy by Alexandr Valialkin
Your Guide to Streaming - The Engineer's Perspective
OSDC 2019 | Fast log management for your infrastructure by Nicolas Frankel
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Why you should be using structured logs
Ad

Recently uploaded (20)

PDF
PDF-XChange Editor Plus 10.7.0.398.0 Crack Free Download Latest 2025
PPTX
Matchmaking for JVMs: How to Pick the Perfect GC Partner
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PPTX
CNN LeNet5 Architecture: Neural Networks
PPTX
R-Studio Crack Free Download 2025 Latest
PPTX
Python is a high-level, interpreted programming language
PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
PPTX
hospital managemt ,san.dckldnklcdnkdnkdnjadnjdjn
PPTX
Presentation by Samna Perveen And Subhan Afzal.pptx
PDF
Workplace Software and Skills - OpenStax
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PDF
Practical Indispensable Project Management Tips for Delivering Successful Exp...
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PPTX
Full-Stack Developer Courses That Actually Land You Jobs
PDF
Guide to Food Delivery App Development.pdf
PDF
CapCut PRO for PC Crack New Download (Fully Activated 2025)
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PPTX
Airline CRS | Airline CRS Systems | CRS System
PPTX
Lecture 5 Software Requirement Engineering
PDF-XChange Editor Plus 10.7.0.398.0 Crack Free Download Latest 2025
Matchmaking for JVMs: How to Pick the Perfect GC Partner
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
CNN LeNet5 Architecture: Neural Networks
R-Studio Crack Free Download 2025 Latest
Python is a high-level, interpreted programming language
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
hospital managemt ,san.dckldnklcdnkdnkdnjadnjdjn
Presentation by Samna Perveen And Subhan Afzal.pptx
Workplace Software and Skills - OpenStax
How Tridens DevSecOps Ensures Compliance, Security, and Agility
Practical Indispensable Project Management Tips for Delivering Successful Exp...
CCleaner 6.39.11548 Crack 2025 License Key
Full-Stack Developer Courses That Actually Land You Jobs
Guide to Food Delivery App Development.pdf
CapCut PRO for PC Crack New Download (Fully Activated 2025)
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Airline CRS | Airline CRS Systems | CRS System
Lecture 5 Software Requirement Engineering
Ad

Logstage - zero-cost-tructured-logging

  • 1. LogStage - zero cost structured logging Maksym Ratoshniuk, 7mind.io
  • 3. What is a structured logging?
  • 4. Common use cases: ● Tracing ● Liveness of your system ● Metrics ○ DB Calls ○ Http flow ○ Payment processing ○ Scheduling (jobs) ● Analytics ○ User behaviour ○ A/B Testing
  • 6. 1. Broken SOLID and lot’s of magic
  • 10. 2. Production unreadiness ● Asynchronous sinks ● File rotation ● Json rendering ● User context (like MDC) ● No performance hotspots
  • 12. 3. Singletons and jar hell
  • 13. We always write code...
  • 14. … that is always structured
  • 15. Logging always should be easy to read... class ExampleService(log: IzLogger) { val justAnArg = "example" val justAList = List[Any](10, "green", "bottles") log.trace(s"Argument: $justAnArg, another arg: $justAList") log.info(s"Named expression: ${Random.nextInt() -> "random number"}") log.warn(s"Invisible: ${Random.nextInt() -> "random number" -> null}") val ctxLog = log("userId" -> "[email protected]", "company" -> "acme") val delta = Random.nextInt(1000) ctxLog.info(s"Processing time: $delta") }
  • 16. … and easier to deal with class ExampleService(logger: IzLogger) { val justAnArg = "example" val justAList = List[Any]( 10, "green", "bottles" ) logger.trace( s"Argument: $justAnArg, another arg: $justAList" ) }
  • 19. Macro-based structuring and context extraction ● Argument names, types, ordering ● Static information (file, line, class, function) ● Static part of our message - message template (interpolation context)
  • 22. Dynamic context & method granularity
  • 25. SLF4J backend A drop-in replacement for Logback, route your legacy logs also
  • 26. Out of box provisioning - Console sink - File sink - Asynchronous sink (single worker thread at the moment) - String and Json rendering
  • 27. Effectful adapters for ZIO, Cats, Monix
  • 29. Template as an identifier If you have a structured DB as a storage, you can querying your logs with the same structure
  • 31. Almost no dependencies Clean, neat, no singletons (except slf4j interop), which may impact on working of systems with isolated classloaders
  • 32. Modular Implement you own sink, router, policy, rotation
  • 33. DI ready Two separate settings set. Isn’t cool? 😍
  • 35. Comparison with popular frameworks Logstage Scribe Airframe Logback + SLF4j Scala Logging Structured ✅ ❌ ❌ ❌ ❌ SOLID rules ✅ ❌ ❌ ❌ ❌ No singletons ✅ ❌ ❌ ❌ ❌ Modularity ✅ ❌ ❌ ❌ ❌ Asynchronous ✅ ✅ ✅ ✅ ✅ DI-readiness ✅ ❌ ❌ ❌ ❌ Colourful ✅ ❌ ✅ ✅ ❌ Dynamic Context ✅ ❌ ❌ ✅ ✅ File rotation ✅ ✅ ✅ ✅ ✅
  • 36. Plans to work with ● Rethinking of rendering policy ● Better configuration ● Integrations with Logback, Azure, ElasticSearch, Kafka ● Profiling and optimization performance
  • 38. Thank you for listening! https://github.com/7mind https://ratoshniuk.github.io/ https://github.com/ratoshniuk/scalaua-2019