Skip to content

Commit

Permalink
Merge pull request #1234 from FoalTS/add-logger
Browse files Browse the repository at this point in the history
Add Foal logger and request ID
  • Loading branch information
LoicPoullain authored Oct 24, 2023
2 parents 55dcf87 + 40ab005 commit a5e36dd
Show file tree
Hide file tree
Showing 91 changed files with 1,685 additions and 410 deletions.
Binary file added docs/blog/assets/version-4.1-is-here/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/blog/version-4.1-release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Version 4.1 release notes
author: Loïc Poullain
author_title: Creator of FoalTS. Software engineer.
author_url: https://loicpoullain.com
author_image_url: https://avatars1.githubusercontent.com/u/13604533?v=4
image: blog/twitter-banners/version-4.1-release-notes.png
tags: [release]
---

![Banner](./assets/version-4.1-is-here/banner.png)

Version 4.1 of [Foal](https://foalts.org/) is out!

<!--truncate-->

## Better logging

Foal now features a true logging system. Full documentation can be found [here](../docs/common/logging).

### New recommended configuration

It is recommended to switch to this configuration to take full advantage of the new logging system.

*config/default.json*
```json
{
"settings": {
"loggerFormat": "foal"
}
}
```

*config/development.json*
```json
{
"settings": {
"logger": {
"format": "dev"
}
}
}
```

## Request IDs

On each request, a request ID is now generated randomly. It can be read through `ctx.request.id`.

If the `X-Request-ID` header exists in the request, then the header value is used as the request identifier.
Binary file added docs/docs/common/images/dev-format.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 docs/docs/common/images/json-format.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 docs/docs/common/images/raw-format.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a5e36dd

Please sign in to comment.