Skip to content

Fixed layout config and aggressive string conversion#2

Open
geekingfrog wants to merge 1 commit into
Fring:masterfrom
geekingfrog:master
Open

Fixed layout config and aggressive string conversion#2
geekingfrog wants to merge 1 commit into
Fring:masterfrom
geekingfrog:master

Conversation

@geekingfrog

Copy link
Copy Markdown

There was a few problem I fixed here:

In the function syslogAin2Appender, the layout parameter was ignored and I removed it.

Also, adding the categoryName at the beginning of the data turns everything into a string. This had the unfortunate effect to 'erase' the stack trace for errors, which are otherwise handled in the messagePassThroughLayout.

// before
logger.error(new Error('boom'));
// output:
// [2014-03-04 13:54:44.283] [ERROR] [default] - [Error: BOOM]

// now the output is:
[2014-03-04 13:54:44.283] [ERROR] [default] - [Error: BOOM]
Error: BOOM
    at Object.<anonymous> (/home/greg/tests/log4jsTest/index.js:44:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants