Skip to content

Commit 1b8e339

Browse files
8081
1 parent c9fea73 commit 1b8e339

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Start server",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/index.js",
15+
"outFiles": [
16+
"${workspaceFolder}/**/*.js"
17+
]
18+
}
19+
]
20+
}

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ log4jsLogger.info('Hello from log4js');
4848
// log('INITIAL LOG');
4949

5050
const app = express();
51-
const port = 8080;
51+
const port = 8081;
5252

5353
app.get('/', (req, res) => {
5454
const wtf = 'afasdf';
@@ -67,6 +67,10 @@ app.get('/', (req, res) => {
6767
app.get('/info', (req, res) => {
6868
winstonLogger.info(`DDNP: INFO at ${Date.now()} as number`);
6969
// winstonLogger.info(`DDNP: INFO at ${Date.now() + `)`} as number`);
70+
// winstonLogger.http(`http message`);
71+
winstonLogger.log('error', 'Error with log message')
72+
// winstonLogger.verbose(`verbose message`);
73+
// winstonLogger.silly(`silly message`);
7074
res.send(`Logging info v3`);
7175
});
7276

logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (apiKey) {
2323
}
2424

2525
const logger = winston.createLogger({
26-
level: 'info',
26+
level: 'silly',
2727
format: winston.format.json(),
2828
transports
2929
});

request.http

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@host = localhost:8080
1+
@host = localhost:8081
22

33

44
### hello world
@@ -20,3 +20,7 @@ Host: {{host}}
2020
### debug
2121
GET /debug HTTP/1.1
2222
Host: {{host}}
23+
24+
### fatal
25+
GET /fatal HTTP/1.1
26+
Host: {{host}}

0 commit comments

Comments
 (0)