Skip to content

Commit

Permalink
feat: allow logging on file
Browse files Browse the repository at this point in the history
  • Loading branch information
matteovivona committed Aug 24, 2023
1 parent 9bdb1fa commit 2f0b9c0
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 95 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
NODE_ENV=
PORT=
LOG_TYPE=
LOG_LEVEL=
LOG_DIR=
TURBO_TOKEN=
STORAGE_PROVIDER=
STORAGE_PATH=
Expand Down
2 changes: 2 additions & 0 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ nav_order: 2
| `PORT` | number | optional | `3000` | |
| `TURBO_TOKEN` | string | mandatory | | Secret token used for the authentication. You can specify multiple tokens separated by comma (e.g. `TURBO_TOKEN=token1,token2,token3`). The value must be the same one provided for the `token` parameter of the `build` script. See enable [custom remote caching](https://ducktors.github.io/turborepo-remote-cache/custom-remote-caching) in a Turborepo monorepo |
| `LOG_LEVEL` | string | optional | Possibile values are [one of these](https://github.com/ducktors/turborepo-remote-cache/blob/main/src/logger.ts#L3) | `'info'` |
| `LOG_TYPE` | string | optional | Setting it to 'file' enables writing logs to file | `stdout` |
| `LOG_DIR` | string | optional | Path and file name where save .log file (e.g. /path/to/my/file.log) | `server.log` |
| `STORAGE_PROVIDER` | string | optional | Possible values are `local`, `s3`, `google-cloud-storage` or `azure-blob-storage`. Use this var to choose the storage provider. | `local` |
| `STORAGE_PATH` | string | optional | | Caching folder under `/tmp` if `STORAGE_PROVIDER` is set to `local`. If `STORAGE_PROVIDER` is set to `s3`, `google-cloud-storage` or `azure-blob-storage`, this will be the name of the bucket. |
| `STORAGE_PATH_USE_TMP_FOLDER` | boolean | optional | `true` | Uses the system tmp folder as a prefix to `STORAGE_PATH` |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0",
"dotenv": "^16.3.1",
"esbuild": "^0.17.6",
"esbuild": "^0.17.19",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
Expand All @@ -85,7 +85,7 @@
"rimraf": "^4.4.1",
"s3rver": "^3.7.1",
"semantic-release": "^20.1.3",
"tap": "^16.3.4",
"tap": "^16.3.8",
"ts-node": "^10.4.0",
"tsup": "^6.6.0",
"typescript": "^4.5.4"
Expand Down
Loading

0 comments on commit 2f0b9c0

Please sign in to comment.