A plugin to tail AWS CloudWatch Logs using cw.
cw installed and on your path
Install using your preferred plugin manager
For example, using Packer
use({ "DiscretePython/cw.nvim", config = function() require("cw").setup({}) end, })
An options table can be passed to the setup function. Valid options are below:
profile
string - Changes which AWS profile is used by default. Default: defaultwrap
boolean - Whether to wrap text in the overlay. Default: falsetail_begin
string - Date/time or human-friendly string to indicate when to start tail, refer to cw for examples. Default: 1hshow_timestamp
boolean - Whether to show the timestamp before each log entry. Default: false
:CWToggle
Toggle the cw overlay:CWSwitchProfile profile
Switches AWS profile to the passed string
The cw overlay can be opened and closed using the :CWToggle command. You may wish
to set this to a keymapping of your choice. For example, mapping to gw
in normal mode:
vim.api.nvim_set_keymap("n", "gw", ":CWToggle<CR>", { silent = true, noremap = true })
After opening the CW overlay, your default profile's log groups will be listed. Highlight
the group you wish to tail and follow and press <CR>
. The log groups output will be tailed
and followed in the overlay.
q
returns to the previous screen.
s
lists streams for the highlighted group.
r
will refresh the list of groups/streams.
<CR>
will tail and follow the highlighted group or stream.
t
will tail the highlighted group or stream, beginning from configured tail_begin
.
- List Log Groups
- List Log Group Streams
- Tail and Follow Log Group
- Switch AWS Profiles
- Tail Log Group
- Switch AWS Regions
- Configure Date and Time Preferences
- Multi-group Tails