Skip to content

Commit

Permalink
Merge pull request #45 from orangain/prepare-release
Browse files Browse the repository at this point in the history
Prepare for release
  • Loading branch information
orangain authored Jul 18, 2024
2 parents e7517d6 + f5f7255 commit 7c55979
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
## [Unreleased]

### Added
- Showing stacktrace when present
- Support for log level in ECS

- Showing stacktrace when present by @vonProteus
- Support for log level in Elastic Common Schema (ECS) by @vonProteus

## [0.1.0] - 2024-06-22

Expand Down
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,42 @@ switch log formats between production and local development environments.
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "Pretty JSON
Log"</kbd> > <kbd>Install</kbd>

![Installation dialog](media/screenshot-installation.png)

- Manually:

Download the [latest release](https://github.com/orangain/pretty-json-log-plugin/releases/latest) and install it
manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

---
After installation, newly written JSON lines logs in the console will be automatically formatted by the plugin.

## Recommended Settings

The following settings will prevent strange display of folding markers when a stack trace is included in the
JSON log.

- <kbd>Settings/Preferences</kbd> > <kbd>Editor</kbd> > <kbd>General</kbd> > <kbd>Console</kbd> >
<kbd>Exceptions</kbd> > <kbd>+</kbd> > <kbd>Enter `":`</kbd> > <kbd>OK</kbd>

![Recommended Settings](media/settings-folding-exception.png)

Before:

![Two folding markers and "internal line" text](media/settings-folding-before.png)

After:

![One folding marker](media/settings-folding-after.png)

## Acknowledgements

This plugin is inspired by the [pino-pretty](https://github.com/pinojs/pino-pretty)
and [bunyan CLI](https://github.com/trentm/node-bunyan). It is based on
the [IntelliJ Platform Plugin Template][template].
and [bunyan CLI](https://github.com/trentm/node-bunyan). The great idea behind these tools is that applications should
write logs in machine-readable format (JSON) and pretty-printing for human readability should be done by another tool. I
am grateful to the authors of these tools.

Thanks to the [IntelliJ Platform Plugin Template][template], I was able to quickly start developing the plugin.

[template]: https://github.com/JetBrains/intellij-platform-plugin-template

Expand Down
Binary file added media/screenshot-installation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/settings-folding-after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/settings-folding-before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/settings-folding-exception.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c55979

Please sign in to comment.