Skip to content

Commit

Permalink
set default of parameter log to off (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
tts-sdrissen committed Jul 14, 2023
1 parent 392ba87 commit d31d82c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Default:
}
```
### `log`
Create a log file with the given name (default is ``, which means no logging) (*optional*)
Create a log file with the given name (default is `off`) (*optional*)

### `logTime`
Include the time of access in the log file (default is `true`) (*optional*)
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ inputs:
log:
description: 'Create a log file with given name'
required: false
default: ''
default: 'off'
logTime:
description: 'Whether to include the time of access in the log file or not'
required: false
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function deploy(config, ready) {
config.contentTypes = {};
}
if (config.log == undefined || config.log == null) {
config.log = "";
config.log = "off";
}
if (config.logTime == undefined || config.logTime == null) {
config.logTime = true;
Expand All @@ -51,7 +51,7 @@ function deploy(config, ready) {
};

server.on('request', (request, response) => {
if (config.log !== "") {
if (config.log !== "off") {
let now = config.logTime ? `[${formatTime.format(new Date())}] ` : '';
let data = '';

Expand Down

0 comments on commit d31d82c

Please sign in to comment.