Working with CloudWatch log events in log streams by using the AWS Toolkit for JetBrains - AWS Toolkit for JetBrains

Working with CloudWatch log events in log streams by using the AWS Toolkit for JetBrains

After you've opened the Log Steams pane, you can access the log events in each stream. Log events are records of activity recorded by the application or resource being monitored.

Viewing and filtering log events in a stream

When you open a log stream, the Log Events pane displays that stream's sequence of log events.

  1. To find a log stream to view, open the Log Streams pane (see Viewing CloudWatch log groups and log streams).

    Note

    You can use pattern matching to locate a stream in a list. Click the Log Streams pane and start entering text. The first log stream name with text that matches yours is highlighted. You can also reorder the list by clicking the top of the Last Event Time column.

  2. Double-click a log stream to view its sequence of log events.

    The Log Events pane displays the log events that make up the log stream.

  3. To filter the log events according to content, enter text in the Filter logstream field and press Return.

    The results are log events containing text that's a case-sensitive match with your filter text. The filter searches the complete log stream, including events not displayed on the screen.

    Note

    You can also use pattern matching to locate a log event in the pane. Click the Log Events pane and start entering text. The first log event with text that matches yours is highlighted. Unlike with Filter logstream search, only on-screen events are checked.

  4. To filter log events according to time, right-click a log event, and then choose Show Logs Around.

    You can select One Minute, Five Minutes, or Ten Minutes. For example, if you select Five Minutes, the filtered list shows only log events that occurred five minutes before and after the selected entry.

    
            Viewing and filtering log actions on the Log Events
              pane.

On the left of the Log Events pane, the log actions offer more ways to interact with log events.

Working with log actions

On the left of the Log Events pane, four log actions allow you to refresh, edit, tail, and wrap CloudWatch log events.


    Viewing log actions on the Log Events pane.
  1. To find log events to interact with, open the Log Streams pane.

  2. Choose one of the following log actions:

    • Refresh – Updates the list with log events that occurred after the Log Events pane was opened.

    • Open in Editor – Opens the on-screen log events in the IDE's default editor.

      Note

      This action exports only on-screen log events to the IDE editor. To view all the stream's events in the editor, choose the Export Log Stream option.

    • Tail logs – Streams new logs events to the Log Events pane. This is a useful feature for continuous updates on longer-running services such as Amazon EC2 instances and AWS CodeBuild builds.

    • Wrap logs – Displays log event text on multiple lines if the size of the pane hides longer entries.

Exporting CloudWatch log events to a file or an editor

Exporting a CloudWatch log stream enables you to open its log events in the IDE's default editor or download them to a local folder.

  1. To find a log stream to access, open the Log Streams pane.

  2. Right-click a log stream, and then choose Export Log Stream, Open in Editor or Export Log Stream, Save to a File.

    • Open in Editor –Opens the log events that make up the selected stream in the IDE's default editor.

      Note

      This option exports all events in the log stream to the IDE editor.

    • Save to a File – Opens the Download Log Stream dialog box. This enables you to select a download folder and rename the file containing the log events.