pm2 Configuration File
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, nodejs
- Domain
- devops
Research direction
Start with ecosystem.config.js and app.js, especially the cwd setting and log4js file appender using the relative filename bot.log. Reproduce the PM2 launch with the supplied paths and check which working directory log4js uses. Done means the log file is created in the telegramBot directory rather than the server directory.
Written by the indexing model from the issue text.
Description
Hi,
I want to manage multiple projects with pm2, but I am having the problem I have given below.
Sample;
- my project directory : C:\Users\username\Desktop\telegramBot
- my pm2 project directory : C:\Users\username\Desktop\server
my pm2 project directory -> ecosystem.config.js content
module.exports = {
apps : [{
name : "telegram",
script : "C:/Users/username/Desktop/telegramBot/app.js",
cwd:"C:/Users/username/Desktop/telegramBot/"
}]
}
app.js content;
log4js.configure({
appenders: {
console: {type: 'console'},
file: {type: 'file', filename: 'bot.log'},
My question is;
It needs to open the bot.log folder in my project directory, but it opens it into my server file. I want it to open in my TelegramBot directory.
Not: I know this will happen when I change app.js in telegramBot.

- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Unitech/pm2
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Errors Open
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100