Comments (5)
What exactly you want to change? :)
Or show your server and logger code.
from server.
As per my previous post I've written this simple function:
/** Display spec'd info using the Logux specified logger to the console.
*/
function debug_logger( action, meta, msg ){
app.reporter.logger.info( { action: action, meta: jsome.getColoredString( meta ) }, msg || '' )
}
I'd like to be able to include other objects in the Bunyan log so something like:
function debug_logger( action, meta, msg, other_obj ){
app.reporter.logger.info( { action: action, meta: meta }, msg || '', other_obj || {} )
or
app.reporter.logger.info( { action: action, meta: meta, other_obj: other_obj || {} }, msg || '')
}
I hope that helps explain things.
from server.
Where and how do you use this debug_logger
?
from server.
I call it in my server code which uses logux server. For example in app.channel( ..)
I call
debug_logger( action, Object.assign( {}, meta, { params: params, creator: creator } ), 'app.channel()' )
so I can include params and creator in the Bunyan log. However it would be much better I could do something like:
debug_logger( action, meta, 'app.channel()', { params: params, creator: creator } )
or something like that.
from server.
In debug_logger
you don't need any special support from Logux. Just write directly to Bunyan instance in server.reporter
from server.
Related Issues (20)
- Change the repo description HOT 1
- Maximum call stack size exceeded HOT 6
- `SyncMap`: allow the developer to halt operation finish HOT 1
- Do not attach 'request' listener if custom http server is provided HOT 6
- Allow to return void in addSyncMap HOT 7
- Question API HOT 1
- Multi-subscribe or Push subscribtions to client? HOT 2
- Wrong meta key in Context#sendBack HOT 3
- Safer shutdown
- Better Host output in human readable log
- Save context between steps HOT 2
- Do not resend action back to the creator HOT 1
- Brute-force protcetion for control server HOT 1
- Rename LOGUX_CONTROL_PASSWORD to LOGUX_CONTROL_SECRET HOT 1
- Extra control server protection with IP mask HOT 1
- Allow cookie based auth HOT 1
- Federatio support
- Add Server#autoloadModules HOT 2
- HTTP proxy server rejects request with { "version": 3, ... } HOT 1
- Add verbose mode for the server to provides additional details HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.