logs: use %o to format error
otherwise, they are printed as multi-line and this messes up tail+date formatting
This commit is contained in:
@@ -131,7 +131,7 @@ function load(modelName) {
|
||||
try {
|
||||
data = JSON.parse(fs.readFileSync(filePath), 'utf8');
|
||||
} catch (e) {
|
||||
debug(`load: failed to read ${filePath}, start with new one.`, e);
|
||||
debug(`load: failed to read ${filePath}, start with new one. %o`, e);
|
||||
}
|
||||
|
||||
DATA_STORE[modelName] = data;
|
||||
@@ -618,7 +618,7 @@ async function renderError(ctx, out, error) {
|
||||
errorMessage: error.error_description || error.error_detail || 'Unknown error'
|
||||
};
|
||||
|
||||
debug('renderError:', error);
|
||||
debug('renderError: %o', error);
|
||||
|
||||
ctx.type = 'html';
|
||||
ctx.body = ejs.render(fs.readFileSync(path.join(__dirname, 'oidc_templates/error.ejs'), 'utf8'), data, {});
|
||||
|
||||
Reference in New Issue
Block a user