Skip to content

Commit 5d887e1

Browse files
KartikeyaRokdedrew-gross
authored andcommitted
FIX #1572 - Accepting LOGS_FOLDER as env variable (#1757)
* FIX #1572 - Accepting LOGS_FOLDER as env variable * Changed env variable LOGS_FOLDER to PARSE_SERVER_LOGS_FOLDER * Added Note for starting parse-server with PARSE_SERVER_LOGS_FOLDER env variable
1 parent 4096518 commit 5d887e1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ That's it! You are now running a standalone version of Parse Server on your mach
2828

2929
**Using a remote MongoDB?** Pass the `--databaseURI DATABASE_URI` parameter when starting `parse-server`. Learn more about configuring Parse Server [here](#configuration). For a full list of available options, run `parse-server --help`.
3030

31+
**Want logs to be in placed in other folder?** Pass the `PARSE_SERVER_LOGS_FOLDER` environment variable when starting `parse-server`. Usage :- `PARSE_SERVER_LOGS_FOLDER='<path-to-logs-folder>' parse-server --appId APPLICATION_ID --masterKey MASTER_KEY`
32+
3133
### Saving your first object
3234

3335
Now that you're running Parse Server, it is time to save your first object. We'll use the [REST API](https://parse.com/docs/rest/guide), but you can easily do the same using any of the [Parse SDKs](https://parseplatform.github.io/#sdks). Run the following:

src/logger.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ if (typeof process !== 'undefined' && process.env.NODE_ENV === 'test') {
99
LOGS_FOLDER = './test_logs/'
1010
}
1111

12+
LOGS_FOLDER = process.env.PARSE_SERVER_LOGS_FOLDER || LOGS_FOLDER;
13+
1214
let currentLogsFolder = LOGS_FOLDER;
1315

1416
function generateTransports(level) {

0 commit comments

Comments
 (0)