Closed ap1969 closed 6 years ago
I don't have such an example. I never expected anybody to want to write a client side custom appender that lives outside jsnlog.ts.
One approach would be to write your appender in JavaScript and not worry about type definitions. For inspiration, the JavaScript version of jsnlog.ts is in jsnlog.js.
In case you're familiar with Node.Js, you can use Winston transports as JSNLog appenders. These live server side in a Node app. See: http://nodejs.jsnlog.com/Documentation/HowTo/LogToDb
Thanks. I had a brainwave - remove the console appender and simply write to console. Stunning idea, eh? :-)
Appreciate the good work - the module has come in really useful.
Problem solved!
Do you use JSNLog for a company? I am keen to have more company logos on the jsnlog.com home page: http://jsnlog.com/
Hi, First of all, I love JSNlog. I've been battling with a number of logging solutions for a JS client application, and none worked well, so thanks for creating this.
However, I'm stuck on something. I'm trying to write a custom appender which is basically a modification to the console appender. I keep hitting issues with the typescript definitions, probably because I'm pretty new to typescript.
Do you have an example appender template which we could use to create our own appenders - something that sits outside the JSNLog package, but references it correctly?
Regards, Andy