40 Ants

My Approach to Logging in Common Lisp Programs [EN Subs]


Listen Later

I tell you how I use Log4CL for logging, about writing additional fields to the log and how to configure logging for Common Lisp in production so that logs are collected from the Kubernetes cluster to a centralized storage.

I have made several libraries that improve Log4CL and make it easier to configure logging. They will be discussed.

Also, I will show you how to use the Yandex Cloud interface to filter logs by the fields that you add using my log4cl-extras library.

However, this video does not cover the topic of collecting logs from the Kubernetes cluster, but after you have made the backend write logs in JSON format, collecting logs from the cluster is no different from programs in other programming languages.

Another topic that I mentioned only in passing is setting logging levels for individual files and packages. But I didn't show what the integration of Log4CL and Emacs looks like. If you are interested to see - write in the comments, I will make another video.

Timecodes:

00:00 Why did I choose log4cl

02:05 What is structural logging?
04:16 Logging in the Cloud
06:50 Adding our fields
10:55 Filtering logs by fields
14:46 Separate logs for REPL
20:37 Configuration of logging levels
25:22 Conclusion

Links:

  • log4cl-extras: https://40ants.com/log4cl-extras / - extension for JSON logs and structural logging
  • log4sly: https://github.com/40ants/log4sly - integration with Emacs and SLY (with SLIME supported out-of-the-box)
  • 40ants-logging: https://40ants.com/logging / - auto-tuning logging when connecting to REPL
  • Tags:

    #commonlisp, #logging, #kubernetes, #yandexcloud, #lisp

    ...more
    View all episodesView all episodes
    Download on the App Store

    40 AntsBy