log4js-test-francisco
v0.0.0
Published
A log4js appender to ship your logs to railtown.ai
Downloads
2
Maintainers
Readme
Log4JS - Railtownai Appender
Installation
npm i @railtownai/log4js-railtownai
Configuration
type
-@railtownai/log4js-railtownai
token
-string
- railtown token
Example
log4js.configure({
appenders: {
railtownai: {
type: '@railtownai/log4js-railtownai',
token: 'your_token_here',
},
},
categories: { default: { appenders: ['railtownai'], level: 'error' } },
});
Manually Logging Errors with additional properties
Import log4jsLogger and use as follows:
try {
// code to try
} catch (error) {
const logError = {
err: error,
userId: '123456789',
projectId:'abcdefg'
};
log4jsLogger.error(logError);
}
This will send log messages to railtownai.