You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A tool to solve [log4js](https://github.com/log4js-node/log4js-node) log synchronization in <ahref="https://github.com/Unitech/pm2"title="PM2">PM2</a>'s multiprocess mode.
9
9
10
10
English | [简体中文](README.zh-CN.md)
11
11
12
12
## Table of Contents
13
13
14
-
-[Background](#background)
15
-
-[Get Started](#get-started)
16
-
-[Install](#install)
17
-
-[Usage](#usage)
18
-
-[API](#api)
19
-
-[Example](#example)
20
-
-[Contributing](#contributing)
21
-
-[License](#license)
14
+
-[pm2-intercom-log4js](#pm2-intercom-log4js)
15
+
-[Table of Contents](#table-of-contents)
16
+
-[Background](#background)
17
+
-[Get Started](#get-started)
18
+
-[Install](#install)
19
+
-[Usage](#usage)
20
+
-[API](#api)
21
+
-[Example](#example)
22
+
-[Contributing](#contributing)
23
+
-[License](#license)
22
24
23
25
## Background
24
26
@@ -33,7 +35,7 @@ pm2-intercom-log4js only exports one function, which is very convenient to use.
33
35
This project uses [node](http://nodejs.org) and [npm](https://npmjs.com). Make sure that you have installed them locally.
34
36
35
37
```sh
36
-
$ npm install @takin/pm2-intercom-log4js
38
+
npm install @takin/pm2-intercom-log4js
37
39
```
38
40
39
41
### Usage
@@ -68,7 +70,7 @@ The `pm2Intercom` function above supports passing in an optional parameters obje
68
70
We use PM2 to run the script in the `examples` directory and start two processes.
69
71
70
72
```sh
71
-
$ pm2 start ./examples/index.js -i 2
73
+
pm2 start ./examples/index.js -i 2
72
74
```
73
75
74
76
When we don't use the `pm2Intercom` function (ie, comment out the `await pm2Intercom();` in the script), we see only one process successfully printing the log through the `pm2 logs` command.
@@ -99,8 +101,8 @@ xxx\.pm2\logs\index-out-0.log last 15 lines:
99
101
100
102
## Contributing
101
103
102
-
You are very welcome to join us! [Submit an issue](https://github.com/BillionBottle/pm2-intercom-log4js/issues/new) or submit a pull request.
104
+
You are very welcome to join us! [Submit an issue](https://github.com/camus-design/pm2-intercom-log4js/issues/new) or submit a pull request.
0 commit comments