Skip to content

Please provide option to change the location of the LOGFILE  #91

@esimeon-hc

Description

@esimeon-hc

Hello, Hope all is well.
Forever-service has been extremely useful for us.
Would like to submit a request to be able to set the location for LOGFILE.
Currently, it is hardcoded in initd.template line 34;
LOGFILE="/var/log/{{service}}.log"

initd.template line 34;
https://github.com/zapty/forever-service/blob/8ac17df6e94767d92352d5ae5eb62573a8ab1c0a/templates/sysvinit/initd.template

upstart.template 25:
https://github.com/zapty/forever-service/blob/8ac17df6e94767d92352d5ae5eb62573a8ab1c0a/templates/upstart/upstart.template

I tried using the forever log option when I created the service:
--foreverOptions " -l /appl/logs/myApp.log"

I got an interesting error:

path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^

TypeError: Path must be a string. Received [ '/var/log/myApp.log', '/appl/logs/myApp.log' ]
at assertPath (path.js:7:11)
at Object.join (path.js:1211:7)
at Object.forever.logFilePath (/usr/lib/node_modules/forever/lib/forever.js:943:12)
at tryStart (/usr/lib/node_modules/forever/lib/forever/cli.js:152:21)
at /usr/lib/node_modules/forever/lib/forever/cli.js:318:5
at Array.forEach (native)
at Object.app.cmd.cli.startDaemon (/usr/lib/node_modules/forever/lib/forever/cli.js:316:11)
at apply (/usr/lib/node_modules/forever/node_modules/director/lib/director/router.js:448:19)
at _every (/usr/lib/node_modules/forever/node_modules/director/lib/director/router.js:30:9)
at Router.invoke (/usr/lib/node_modules/forever/node_modules/director/lib/director/router.js:454:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions