I see you'd already opened an issue 
<https://issuetracker.google.com/36851656> but it was closed. The reason 
being is that Google does not maintain the winston-gae project, which is an 
open source project. We do provide access to the Cloud Logging APIs via 
google-cloud-node 
<https://googlecloudplatform.github.io/google-cloud-node/#/docs/logging/0.9.0/logging/log>
 
though which you can use to implement your own logger or use directly in 
your code (or which can be referenced to update winston-gae, or implement a 
different solution).

On Monday, April 3, 2017 at 3:00:19 AM UTC-4, Marco Galassi wrote:
>
> Yes, but that basically is just the same as doing 
> console.log('stdout');
> console.error('stderr');
>
> It would be nice to open an issue to ask google to implement it. Where 
> could I do this?
>
> Marco
>
>
> On Saturday, April 1, 2017 at 12:25:40 AM UTC+2, Adam (Cloud Platform 
> Support) wrote:
>>
>> I've also been unable to get winston-gae working. It hasn't been updated 
>> in over 2 years and is not an official Google library, so for now it seems 
>> it's in need of a maintainer.
>>
>> The standard winston <https://www.npmjs.com/package/winston> logger does 
>> work, but only outputs to stdout and as such you don't get proper severity 
>> in the Logs Viewer.
>>
>> On Friday, March 31, 2017 at 11:03:20 AM UTC-4, Marco Galassi wrote:
>>>
>>>
>>> I am using nodejs on App Engine and I would like to have the ability to 
>>> log my application in an easy manner.
>>> Possibily, I would like to be able to log as easy as in python standard 
>>> environment 
>>> <https://cloud.google.com/appengine/docs/standard/python/logs/>:
>>>
>>> import logging
>>>> import webapp2
>>>> class MainPage(webapp2.RequestHandler):
>>>>   def get(self):
>>>>     logging.debug('This is a debug message')
>>>>     logging.info('This is an info message')
>>>>     logging.warning('This is a warning message')
>>>>     logging.error('This is an error message')
>>>>     logging.critical('This is a critical message')
>>>>     try:
>>>>       raise ValueError('This is a sample value error.')
>>>>     except ValueError:
>>>>       logging.exception('A example exception log.')
>>>>     self.response.out.write('Logging example.') 
>>>
>>>  
>>>
>>> app = webapp2.WSGIApplication([ 
>>>
>>>     ('/', MainPage)
>>>> ], debug=True)
>>>
>>>
>>> This is very useful since it shows the logs with the corresponding 
>>> logging severity in the Stackdriver Logging console.
>>> Unfortunately, it doesn't look that something like this is possible on 
>>> NodeJS.
>>>
>>> I have tried to follow what the documentation says 
>>> <https://cloud.google.com/appengine/docs/flexible/nodejs/writing-application-logs>
>>>  
>>> on logging on NodeJS, which says that I can use winston-gae 
>>> <https://www.npmjs.com/package/winston-gae>, but it doesn't work at all.
>>>
>>> Any help is very appreciated.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f2a36e28-d982-47ef-9d26-40534606e6d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to