Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14027703
D11339.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11339.diff
View Options
diff --git a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
--- a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
+++ b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
@@ -136,9 +136,7 @@
$server_argv[] = '--ssl-cert='.$ssl_cert;
}
- if (!$this->debug) {
- $server_argv[] = '--log='.$log;
- }
+ $server_argv[] = '--log='.$log;
if ($this->clientHost) {
$server_argv[] = '--client-host='.$this->clientHost;
diff --git a/support/aphlict/server/aphlict_server.js b/support/aphlict/server/aphlict_server.js
--- a/support/aphlict/server/aphlict_server.js
+++ b/support/aphlict/server/aphlict_server.js
@@ -43,7 +43,25 @@
var config = parse_command_line_arguments(process.argv);
process.on('uncaughtException', function(err) {
- debug.log('\n<<< UNCAUGHT EXCEPTION! >>>\n' + err.stack);
+ var context = null;
+ if ((err.code == 'EACCES') &&
+ (err.path == config.log)) {
+ context = util.format(
+ 'Unable to open logfile ("%s"). Check that permissions are set ' +
+ 'correctly.',
+ err.path);
+ }
+
+ var message = [
+ '\n<<< UNCAUGHT EXCEPTION! >>>',
+ ];
+ if (context) {
+ message.push(context);
+ }
+ message.push(err.stack);
+
+ debug.log(message.join('\n\n'));
+
process.exit(1);
});
@@ -69,8 +87,8 @@
}
// Add the logfile so we'll fail if we can't write to it.
-if (config.logfile) {
- debug.addLogfile(config.logfile);
+if (config.log) {
+ debug.addLogfile(config.log);
}
// If we're just doing a configuration test, exit here before starting any
diff --git a/support/aphlict/server/lib/AphlictLog.js b/support/aphlict/server/lib/AphlictLog.js
--- a/support/aphlict/server/lib/AphlictLog.js
+++ b/support/aphlict/server/lib/AphlictLog.js
@@ -20,7 +20,7 @@
mode: 066
};
- var logfile = fs.createWriteSteam(path, options);
+ var logfile = fs.createWriteStream(path, options);
this._writeToLogs.push(logfile);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 8:55 AM (3 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716584
Default Alt Text
D11339.diff (2 KB)
Attached To
Mode
D11339: Fix Aphlict logging
Attached
Detach File
Event Timeline
Log In to Comment