Skip to content

A bare-bones library for watching AWS logs (like saw, but Clojure)

Notifications You must be signed in to change notification settings

fulcrologic/aws-logs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWS Log Helpers

There is a general CLI called saw that works reasonably well, but I needed something that was easier to tune. The AWS API is pretty easy to work with, so having something in Clojure that can be used to deal with logging concerns is nice.

Usage

Add an alias to your deps:

 :aliases {:watch {:replace-deps {com.fulcrologic/aws-logs {:git/url "[email protected]:fulcrologic/aws-logs.git"
                                                            :git/sha "latest"}}
                   :exec-fn   com.fulcrologic.aws-logs.log-access/watch
                   :exec-args {:log-group    "name-of-aws-log-group"
                               ;; optional
                               :include-stdout? false
                               :strip-prefix "text-to-strip-from-front-of-stream-names"}}}

:log-group is the name of an AWS log group, such as datomic-my-sys-name. The :strip-prefix is text to strip from the front of log stream names. Streams that have an instance ID on them will be shortened as well to help with log readability.

If the log events include :level, then they are considered part of your "normal" logs; otherwise the messages are considered part of the instance STDOUT. By default stdout is NOT shown. If you want to include it, then set include-stdout? to true.

REPL Usage

The log-access namespace has various functions. See the docstrings for more info.

About

A bare-bones library for watching AWS logs (like saw, but Clojure)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published