proteusjs-console
v1.0.0
Published
Proteusjs Console Plugin
Downloads
2
Maintainers
Readme
proteusjs-console
proteusjs-console
is a transform stream useful for turning proteusjs server
, database
and http call
events into formatted strings.
Lead Maintainer: Jai Kishan
Usage
new ProteusjsConsole([config])
Creates a new ProteusjsConsole object with the following arguments:
[config]
- optional configuration object with the following keys
Output Formats
Below are example outputs for the designated event type:
[server event]
log
- 160925/080223.698, [server:log] {event.data} pid: ({event.pid})request
- 160925/080710.318, [server:request] ${event.method} ${event.path}response
- 160925/080710.304, [server:response] http://localhost:6200: ${event.method} ${event.path} {} {event.statusCode} ({event.responseTime}ms)ops
- 160925/080722.290, [server:ops] memory: 66Mb, uptime (seconds): 31.802, load: [0,0,0]error
- 160925/080722.290, [server:error] message:event.errorMessage
stack:event.errorStack
[database event]
query
- 160925/065549.166, [knex:query] select [ sql: select * fromlog
]end
- 160925/071149.107, [knex:end] info: Query executed successfullyqueryerror
- 160925/072007.936, [knex:queryerror] error: [ select * fromlogg
- ER_NO_SUCH_TABLE: Table 'sample.logg' doesn't exist ]error
- 160925/074231.942, [knex:error] error: [ select * fromlogg
- ER_NO_SUCH_TABLE: Table 'sample.logg' doesn't exist ]
[httpclient event]
request
- 160925/060859.691, [wreck:request] get https://github.com/hawdi/proteusjsresponse
- 160925/062323.377, [wreck:response] get https://github.com/hawdi/proteusjs (200|OK)