[Groonga-commit] nroonga/nroonga-httpd [master] specify log level for console

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 8日 (木) 20:50:43 JST


Yoji SHIDARA	2012-03-08 20:50:43 +0900 (Thu, 08 Mar 2012)

  New Revision: 4a76fc7f3c98b33b431372839e435875207763ba

  Log:
    specify log level for console

  Modified files:
    lib/command.coffee
    lib/server.coffee

  Modified: lib/command.coffee (+3 -3)
===================================================================
--- lib/command.coffee    2012-03-08 20:46:43 +0900 (7effa63)
+++ lib/command.coffee    2012-03-08 20:50:43 +0900 (4b5b36a)
@@ -70,13 +70,13 @@ exports.run = ->
         process.exit(0)
       else
         if argv.v
-          console.log "Server listening at port #{argv.p} (#{argv.t} workers)."
-          console.log "Document root is #{argv['document-root']}"
+          console.info "Server listening at port #{argv.p} (#{argv.t} workers)."
+          console.info "Document root is #{argv['document-root']}"
 
         for i in [0...argv.t]
           cluster.fork()
         cluster.on 'death', (worker) ->
-          console.log "worker #{worker.pid} died"
+          console.error "worker #{worker.pid} died"
     else
       app = nroongaHttpd.createServer
         dbPath: argv._[0]

  Modified: lib/server.coffee (+1 -1)
===================================================================
--- lib/server.coffee    2012-03-08 20:46:43 +0900 (b728bbb)
+++ lib/server.coffee    2012-03-08 20:50:43 +0900 (72ba3a7)
@@ -39,7 +39,7 @@ exports.createServer = (config={}) ->
       doneAt = (new Date()).getTime() / 1000
       duration = doneAt - startAt
       if error?
-        console.log(error)
+        console.error(error)
         res.send([[-1, startAt, duration, error.toString(), []]], 500)
       else
         res.send([[0, startAt, duration], data])




Groonga-commit メーリングリストの案内
Back to archive index