Comments (3)
I'm also strongly against this over-engineering proposal. I'll reiterate my points from the email thread so there'd be a central log of the arguments:
Karl Düüna (@DeadAlready) wrote:
I also suggest we refrain from using console.log (seeing as it is also disabled in the jsHint "devel": false, // Allow development statements e.g.console.log();
.) and use a logger like bunyan (https://github.com/trentm/node-bunyan) which creates JSON logs and provides a CLI tool for better readability and debugging.
And again — which problem of console.log is Bunyan solving? Console.log statements are a marvelously simple solution as a lot of init daemons (like Upstart) already log stdout output to a text files. If you want JSON, just print objects.
If we precisely require remote logging, then I strongly suggest keeping away from all "fancy" logger reinventions and just send plain text to Syslog. There are bigger benefits in trusting the work of Unix neckbeards than brogammers. ;-)
Karl Düüna (@DeadAlready) wrote:
Logging - again console.log is sufficient if the project stays simple.
Then we're in agreement again. Until a problem becomes a problem, let's not solve it.
Karl Düüna (@DeadAlready) wrote:
I suggested bunyan because it allows easy separation of logging based on files and/or modules and/or sessions and/or log level(by creating child loggers and using different log levels) and the CLI tool provides easy filtering for logged values. Something I find useful both in development and production environments to better track down the problem part or user specific behaviour.
Those can of course be also achieved with console.log and grep if you repeatedly remember log everything in the right manner. And is of course not necessary just helpful. But if the projects aim is (besides the vulnerabilities that are to be introduced) to be an example then proper logging is a must in my opinion.
We'll first have to decide what is proper logging. Proper logging is also a different question from "proper" library. No library helps you if you don't know what you're doing. And until you have a need to log more than mere requests, it's counter-productive to think about logging libraries. But I understand it's in human nature — there are countless people buying running shoes and camera lenses that never take a hike nor a picture. ;-)
Logging libraries that are bundled with their own CLI tools are already doing a lousy design decision on their part. Printing stuff out in a standardized format and filtering data are two different responsibilities.
Fortunately this app is running on Heroku which comes with its own request logging. ;)
from nodegoat.
OK. Lets stick with console.log() for now. Moving issue to milestone 3 to review again after getting better idea of actual project needs.
from nodegoat.
Closed for version 1.0.0
from nodegoat.
Related Issues (20)
- Lerna Implementation
- React and Express API app
- Restore A9 Insecure Components vulnerability HOT 6
- There is no 404 page. HOT 3
- livereload.js making tests run slower HOT 2
- Webinterface: Wording HOT 1
- Heroku - mLab MongoDB Add-on Discontinued HOT 5
- docker_compose.yml doesn't set MONGODB_URI HOT 1
- Travis config warnings HOT 2
- NodeGoat Research page SSRF also enables DoS HOT 1
- purpleteam now at alpha HOT 2
- Unexpected path traversal vulnerability HOT 3
- A9 - Wrong url, to be removed HOT 1
- Broken XSS example
- Missing anchors in validation regular expression HOT 1
- Node Goat Herokuapp Application Error HOT 1
- Not working with MongoDB 5 HOT 4
- Setup Issue HOT 8
- Tutorial Guide page is not working HOT 4
- OpenAPI documentation
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 nodegoat.