Skip to content

Commit

Permalink
FIX #1572 - Accepting LOGS_FOLDER as env variable (#1757)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
KartikeyaRokde authored and drew-gross committed May 18, 2016
1 parent 4096518 commit 5d887e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ That's it! You are now running a standalone version of Parse Server on your mach

**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`.

**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`

### Saving your first object

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:
Expand Down
2 changes: 2 additions & 0 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if (typeof process !== 'undefined' && process.env.NODE_ENV === 'test') {
LOGS_FOLDER = './test_logs/'
}

LOGS_FOLDER = process.env.PARSE_SERVER_LOGS_FOLDER || LOGS_FOLDER;

let currentLogsFolder = LOGS_FOLDER;

function generateTransports(level) {
Expand Down

0 comments on commit 5d887e1

Please sign in to comment.