Integrating NodeWebkit with Winston.

5 views
Skip to first unread message

Sreenidhi Sreesha

unread,
Jan 19, 2014, 2:59:02 AM1/19/14
to node-...@googlegroups.com
Has anyone integrated winston logging framework into nodewebkit? Which logging framework do you use along with Nodewebkit? 

Thank you.

Sreenidhi Sreesha

unread,
May 7, 2014, 12:53:51 AM5/7/14
to node-...@googlegroups.com
*BUMP*

Alain Ekambi

unread,
May 7, 2014, 2:49:27 AM5/7/14
to node-...@googlegroups.com
We use log4j since we write our NodeWebkit applications in Java(GWT).
Probably wont help you a lot in your product.


--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Alain Ekambi

Co-Founder

Ahomé Innovation Technologies

http://www.ahome-it.com/

Laszlo Z. Antal

unread,
May 7, 2014, 11:05:38 AM5/7/14
to node-...@googlegroups.com
Hi,


On May 6, 2014, at 23:49, Alain Ekambi <jazzma...@gmail.com> wrote:

We use log4j since we write our NodeWebkit applications in Java(GWT).
Probably wont help you a lot in your product.


2014-05-07 6:53 GMT+02:00 Sreenidhi Sreesha <sreenidh...@gmail.com>:
*BUMP*

On Saturday, January 18, 2014 11:59:02 PM UTC-8, Sreenidhi Sreesha wrote:
Has anyone integrated winston logging framework into nodewebkit? Which logging framework do you use along with Nodewebkit? 

Thank you

What kind of logging do you need? I mean if it's nothing special just write your own, I did. It's a simple function in the module logging but you can me it what ever that uses fs so it's not blocking. I have format variable that defines what gets logged and also the last option in the function call for the level Eg: ERROR, INFO etc...
What's great about it is that if I want I can switch over to store the logs in a db instead of a file or even send it to a webservice. 
Other reason I needed to write my own so that I can strip the logging calls out of the finished product easily.

Hope it helps

Laszlo

Sreenidhi Sreesha

unread,
May 10, 2014, 1:21:15 AM5/10/14
to node-...@googlegroups.com
Thanks for the reply guys. 

I was able to integrate winston, there was a bit of configuration error which confused me.  I was using my own logger but it had a small problem. The logs were written in batches so many of them had the same time stamp.  Now, its resolved. Appreciate your willingness to help. 


--
You received this message because you are subscribed to a topic in the Google Groups "node-webkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-webkit/u80a-i78fXc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-webkit...@googlegroups.com.

henrique matias

unread,
May 23, 2014, 8:13:13 AM5/23/14
to node-...@googlegroups.com
Hello Sreenidhi,

Did you have to do any workaround to get it working?

I tried to use wiston, but its failing silently.

No logs, either on the debug console, either on "app.log" on my home folder.



path    = window.require('path-extra')
winston = window.require('winston')

logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)(),
new (winston.transports.File)({ filename: path.homedir() + 'app.log' })
]
});

logger.log( "test is test!!!" )

Sreenidhi Sreesha

unread,
May 28, 2014, 12:31:55 PM5/28/14
to node-...@googlegroups.com
Hi Henrique,

I did not have to do any workaround to get winston working. Check the filepath.  Try this

path    = window.require('path-extra')
winston = window.require('winston')

logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)(),
new (winston.transports.File)({ filename: PATH.join(path.homedir(), 'app.log') })
]
});

henrique matias

unread,
May 28, 2014, 5:51:20 PM5/28/14
to node-...@googlegroups.com
oh i see, might have been the lack of path.join / path.resolve
Reply all
Reply to author
Forward
0 new messages