Comments (6)
log.info(JSON.stringify({me: {fname: 'k', lname: 'k', bdate: new Date(2000, 01, 01)}}))
does the same. If you need primitives, I think that library might suit you better.
from node-gelf-pro.
What is the expectations? Could you provide some examples?
from node-gelf-pro.
I want to dump the whole object into graylog as it is.
{me: {fname: 'k', lname: 'k', bdate: new Date(2000, 01, 01)}}
This should be one field with key : me
and value: {fname: 'k', lname: 'k', bdate: new Date(2000, 01, 01)}
I assume that this capability to convert a plain object was added to the library to enhance the search in graylog. But if I do this, the number of fields in my index increases drastically and leads to index failure. Only 1000 fields are allowed in 1 index.
from node-gelf-pro.
I want to dump the whole object into graylog as it is.
You can't do that (elasticsearch is typed(Double/Long/etc.) and node.js is not). Though, you may try to use JSON.stringify. If the object is huge, try to stringify
the second level only and so on.
Also, you can always implement toString() method and it'll be used automatically to convert your object into a string.
from node-gelf-pro.
This library allows me to do it: https://www.npmjs.com/package/graylog2
from node-gelf-pro.
Yea I get it. Btw, toString()
doesn't work.
from node-gelf-pro.
Related Issues (20)
- Drop support of dead node.js releases (end-of-life versions)
- Delays releasing UDP port on DNS timeout. HOT 1
- Can I use multiple GELF configurations? HOT 2
- Manually setting levels or aliases doesn't expose corresponding methods
- Compatibility HOT 5
- Update lodash version - security vulnerability
- Why is id field dropped from message? HOT 6
- Compatibility with Graylog 3 HOT 1
- Angular support HOT 1
- socket reuse HOT 3
- Validation for a custom short_message field HOT 3
- UDP Adapter: Ability to pass dgram options HOT 2
- Crash on setConfig method HOT 3
- Typescript: Property 'info' does not exist on type 'typeof import("gelf-pro") ... HOT 1
- ERR_SOCKET_DGRAM_NOT_RUNNING error when chunking request body(fix suggested) HOT 1
- Unstable sending of chunked messages HOT 2
- Dynamic import issue when a bundle package in ESM with node-gelf-pro HOT 1
- Is there a way to integrate this package with winston?
- Test failing with Uncaught AssertionError on node 21
- Beautify json 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 node-gelf-pro.