Skip to content

Commit 6b3c574

Browse files
committed
Fixed jsdoc format and generated latest docs
1 parent 0e7fd9f commit 6b3c574

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

packages/monitor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ Options for how an app's logs should be saved, routed and displayed.
142142
| Property | Type | Default | Description |
143143
| - | - | - | - |
144144
| <a name="module_monitor-options.AppLogOptions+logToLaunchpadDir">`logToLaunchpadDir`</a> | <code>boolean</code>| <code>true</code> | Route application logs to launchpad's log dir instead of pm2's log dir. |
145-
| <a name="module_monitor-options.AppLogOptions+mode">`mode`</a> | <code>string</code>| <code>'file'</code> | How to grab the app's logs. Supported values:<br>- `'file'`: Logs by tailing the app's log files. Slight lag, but can result in better formatting than bus.<br>- `'bus'`: Logs directly from the app's stdout/stderr bus. Can result in interrupted logs if the buffer isn't consistently flushed by an app. |
145+
| <a name="module_monitor-options.AppLogOptions+mode">`mode`</a> | <code>&#x27;bus&#x27;</code> \| <code>&#x27;file&#x27;</code>| <code>'bus'</code> | How to grab the app's logs. Supported values:<br>- `'bus'`: Logs directly from the app's stdout/stderr bus. Can result in interrupted logs if the buffer isn't consistently flushed by an app.<br>- `'file'`: Logs by tailing the app's log files. Slight lag, but can result in better formatting than bus. Not recommended, as logs cannot be rotated by launchpad. |
146146
| <a name="module_monitor-options.AppLogOptions+showStdout">`showStdout`</a> | <code>boolean</code>| <code>true</code> | Whether or not to include output from `stdout` |
147147
| <a name="module_monitor-options.AppLogOptions+showStderr">`showStderr`</a> | <code>boolean</code>| <code>true</code> | Whether or not to include output from `stderr` |

packages/monitor/lib/app-log-router.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,30 +57,29 @@ export class LogRelay {
5757
* @param {SubEmitterSocket} _pm2Bus
5858
*/
5959
connectToBus(_pm2Bus) {
60-
// implement this fn in all child classes
60+
// Implement this fn in all child classes
6161
throw new Error("not implemented");
6262
}
6363

6464
/**
6565
* @param {SubEmitterSocket} _pm2Bus
6666
*/
6767
disconnectFromBus(_pm2Bus) {
68-
// implement this fn in all child classes
68+
// Implement this fn in all child classes
6969
throw new Error("not implemented");
7070
}
7171

7272
/**
73-
* higher order function for filtering out events that are not related to this relay
73+
* Higher order function for filtering out events that are not related to this relay
7474
* @protected
75-
* @param {(eventData: *) => void} handler
76-
* @returns {(eventData: *) => void}
75+
* @param {function(*):void} handler
76+
* @returns {function(*):void}
7777
*/
7878
filterEvents = (handler) => {
7979
const wrappedHandler = (eventData) => {
8080
if (eventData?.process?.name !== this._appOptions.pm2.name) return;
8181
handler.bind(this)(eventData);
8282
};
83-
8483
return wrappedHandler;
8584
};
8685
}
@@ -305,7 +304,7 @@ export default class AppLogRouter {
305304

306305
const appLogger = LogManager.getInstance().getLogger(appName, this._logger);
307306

308-
if (logOptions.mode == LogModes.TailLogFile) {
307+
if (logOptions.mode === LogModes.TailLogFile) {
309308
const fileRelay = new FileLogRelay(appOptions, appLogger);
310309
this._logRelays.set(appName, fileRelay);
311310
} else {

0 commit comments

Comments
 (0)